Skip to content

pnpm: use global virtual store#13136

Closed
OliverJAsh wants to merge 1 commit intomasterfrom
worktrees
Closed

pnpm: use global virtual store#13136
OliverJAsh wants to merge 1 commit intomasterfrom
worktrees

Conversation

@OliverJAsh
Copy link
Copy Markdown
Contributor

@OliverJAsh OliverJAsh commented Apr 1, 2026

See https://pnpm.io/11.x/git-worktrees. Note pnpm i on first run will prompt you to reinstall your node_modules.

https://pnpm.io/11.x/git-worktrees

Note `pnpm i` on first run will prompt you to reinstall your `node_modules`.
Copilot AI review requested due to automatic review settings April 1, 2026 10:33
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
gitbutler-web Ignored Ignored Preview Apr 1, 2026 10:33am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates workspace tooling/docs to better support working from Git/Codex worktrees by centralizing pnpm’s virtual store behavior and standardizing Lite commands to run within the Nix devshell.

Changes:

  • Enable pnpm’s global virtual store for the workspace.
  • Update Lite agent instructions to run pnpm commands via nix develop -c ….
  • Add a Codex environment definition that installs deps and provides a “Lite: typecheck” action.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pnpm-workspace.yaml Enables enableGlobalVirtualStore to reduce duplication across worktrees.
apps/lite/AGENTS.md Documents running Lite typecheck/lint/format commands inside the Nix flake devshell.
.codex/environments/environment.toml Adds Codex environment setup and a Lite typecheck action using the Nix devshell.

@OliverJAsh OliverJAsh changed the base branch from master to worktrees-1 April 1, 2026 10:44
@OliverJAsh OliverJAsh changed the title Optimize tooling for Git/Codex worktrees pnpm: use global virtual store Apr 1, 2026
Base automatically changed from worktrees-1 to master April 1, 2026 10:58
@samhh
Copy link
Copy Markdown

samhh commented Apr 13, 2026

A Bluesky thread about this because also TIL: https://bsky.app/profile/patak.cat/post/3mj5ttmrb3s2s

@Byron
Copy link
Copy Markdown
Collaborator

Byron commented Apr 14, 2026

While this isn't merged, is this something we can try personally with pnpm config set --global enableGlobalVirtualStore true?

Answer: it definitely seems to be effective.
Somehow I am hesitant as I am not sure if this breaks Windows?

@Byron Byron marked this pull request as draft April 14, 2026 00:58
@Byron
Copy link
Copy Markdown
Collaborator

Byron commented Apr 14, 2026

I put it back to draft to prevent accidental merges. The reason is that it seems to break the tauri dev workflow.

To reproduce

  • enable the setting with pnpm config set --global enableGlobalVirtualStore true
  • run pnpm install
  • run pnpm tauri dev

Now I see :

❯ GITBUTLER_PERFORMANCE_LOG=1 LOG_LEVEL=debug pnpm tauri dev --no-watch

> root@ tauri /Users/byron/dev/github.com/gitbutlerapp/gitbutler
> cross-env "CARGO_TARGET_DIR=$PNPM_SCRIPT_SRC_DIR/target/tauri" tauri dev --no-watch

     Running BeforeDevCommand (`pnpm dev:internal-tauri`)

> root@ dev:internal-tauri /Users/byron/dev/github.com/gitbutlerapp/gitbutler
> turbo watch --filter @gitbutler/desktop dev

• turbo 2.8.17
• Packages in scope: @gitbutler/desktop
• Running dev in 1 packages
• Remote caching disabled
@gitbutler/core:package: cache hit, replaying logs 18578aa40f6f244d
@gitbutler/core:package:
@gitbutler/core:package:
@gitbutler/core:package: > @gitbutler/core@0.0.1 package /Users/byron/dev/github.com/gitbutlerapp/gitbutler.edit-mode-errors/packages/core
@gitbutler/core:package: > tsc -p tsconfig.json
@gitbutler/core:package:
@gitbutler/svelte-comment-injector:package: cache hit, replaying logs 7e417a65d739511c
@gitbutler/svelte-comment-injector:package:
@gitbutler/svelte-comment-injector:package:
@gitbutler/svelte-comment-injector:package: > @gitbutler/svelte-comment-injector@1.0.1 package /Users/byron/dev/github.com/gitbutlerapp/gitbutler.wire-change-ids/packages/svelte-comment-injector
@gitbutler/svelte-comment-injector:package: > tsc
@gitbutler/svelte-comment-injector:package:
@gitbutler/ui:package: cache miss, executing 838b1bb92b773dd3
@gitbutler/ui:package:
@gitbutler/ui:package:
@gitbutler/ui:package: > @gitbutler/ui@0.0.2 package /Users/byron/dev/github.com/gitbutlerapp/gitbutler/packages/ui
@gitbutler/ui:package: > pnpm run --sequential "/^package:.*/"
@gitbutler/ui:package:
@gitbutler/ui:package:
@gitbutler/ui:package: > @gitbutler/ui@0.0.2 package:svelte /Users/byron/dev/github.com/gitbutlerapp/gitbutler/packages/ui
@gitbutler/ui:package: > svelte-kit sync && svelte-package
@gitbutler/ui:package:
        Warn Waiting for your frontend dev server to start on http://localhost:1420/...
@gitbutler/ui:package: > You need to install TypeScript if you want to transpile TypeScript files and/or generate type definitions
@gitbutler/ui:package:     at try_load_ts (file:///Users/byron/Library/pnpm/store/v10/links/@sveltejs/package/2.5.7/35b120a59b777f30120496fcd3c6e6deb253a22b78fa0e2e38900623f2b61f5c/node_modules/@sveltejs/package/src/typescript.js:118:9)
@gitbutler/ui:package:     at async load_tsconfig (file:///Users/byron/Library/pnpm/store/v10/links/@sveltejs/package/2.5.7/35b120a59b777f30120496fcd3c6e6deb253a22b78fa0e2e38900623f2b61f5c/node_modules/@sveltejs/package/src/typescript.js:132:8)
@gitbutler/ui:package:     at async process_file (file:///Users/byron/Library/pnpm/store/v10/links/@sveltejs/package/2.5.7/35b120a59b777f30120496fcd3c6e6deb253a22b78fa0e2e38900623f2b61f5c/node_modules/@sveltejs/package/src/index.js:275:20)
@gitbutler/ui:package:     at async do_build (file:///Users/byron/Library/pnpm/store/v10/links/@sveltejs/package/2.5.7/35b120a59b777f30120496fcd3c6e6deb253a22b78fa0e2e38900623f2b61f5c/node_modules/@sveltejs/package/src/index.js:51:3)
@gitbutler/ui:package:     at async Module.build (file:///Users/byron/Library/pnpm/store/v10/links/@sveltejs/package/2.5.7/35b120a59b777f30120496fcd3c6e6deb253a22b78fa0e2e38900623f2b61f5c/node_modules/@sveltejs/package/src/index.js:23:2)
@gitbutler/ui:package:     at async file:///Users/byron/Library/pnpm/store/v10/links/@sveltejs/package/2.5.7/35b120a59b777f30120496fcd3c6e6deb253a22b78fa0e2e38900623f2b61f5c/node_modules/@sveltejs/package/src/cli.js:57:4
@gitbutler/ui:package:  ELIFECYCLE  Command failed with exit code 1.
@gitbutler/ui:package:
@gitbutler/ui:package: > @gitbutler/ui@0.0.2 package:styles /Users/byron/dev/github.com/gitbutlerapp/gitbutler/packages/ui
@gitbutler/ui:package: > postcss ./src/styles/main.css -o ./dist/styles/main.css
@gitbutler/ui:package:
@gitbutler/ui:package:  ELIFECYCLE  Command failed with exit code 1.
@gitbutler/ui:package: ERROR: command finished with error: command (/Users/byron/dev/github.com/gitbutlerapp/gitbutler/packages/ui) /opt/homebrew/bin/pnpm run package exited (1)
@gitbutler/ui#package: command (/Users/byron/dev/github.com/gitbutlerapp/gitbutler/packages/ui) /opt/homebrew/bin/pnpm run package exited (1)
        Warn Waiting for your frontend dev server to start on http://localhost:1420/...
^C    ...Finishing writing to cache...                                                                                                                                                                                  ELIFECYCLE  Command failed.
 ELIFECYCLE  Command failed with exit code 130.

It complains about not having typescript?

Maybe this can be fixed though, CC @mtsgrd .

I turned that setting back off, then re-installed with pnpm install, and tauri ran like before.

@OliverJAsh OliverJAsh closed this Apr 14, 2026
@OliverJAsh OliverJAsh deleted the worktrees branch April 14, 2026 09:04
@OliverJAsh
Copy link
Copy Markdown
Contributor Author

Closing for now as I don't plan to work on this, but happy for someone else to pick it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants