Skip to content

Turbo prune of bun monorepo leaves bad entries in pruned lockfile #10410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
nzapponi opened this issue Apr 30, 2025 · 4 comments
Open
1 task done

Turbo prune of bun monorepo leaves bad entries in pruned lockfile #10410

nzapponi opened this issue Apr 30, 2025 · 4 comments
Labels
needs: triage New issues get this label. Remove it after triage

Comments

@nzapponi
Copy link

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/nzapponi/turbo-prune-bun-repro

Which canary version will you have in your reproduction?

2.5.3-canary.0

Environment information

turbo 2.5.3-canary.0

CLI:
   Version: 2.5.3-canary.0
   Path to executable: /Users/xxx/Desktop/bun-turbo-prune/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Not running
   Package manager: bun

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 3031
   Available CPU cores: 10

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): vscode
   Terminal program version (TERM_PROGRAM_VERSION): 1.99.2
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

Pruned lockfile should only include packages that are part of the dependencies of the given package.

Actual behavior

Pruned lockfile (https://github.com/nzapponi/turbo-prune-bun-repro/blob/dd539884f62e912c09f5f2ceed7ad28a663ef789/out/json/bun.lock) includes packages that shouldn't be in there (e.g. @react-native/community-cli-plugin/debug).

Because it includes it, bun install --frozen-lockfile fails.

To Reproduce

  • Copy out/json folder outside the tree, remove bun.lock and run bun install
  • Compare newly generated bun.lock with the one in my repo

Additional context

In the repro repo, bun install --frozen-lockfile still seems to succeed somehow, however in my larger private repo, I can't use --frozen-lockfile at all

@nzapponi nzapponi added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Apr 30, 2025
@anthonyshew anthonyshew removed the kind: bug Something isn't working label Apr 30, 2025
@anthonyshew
Copy link
Contributor

@camero2734, just tagging you in case you want to take a look as original implementer in #10175! Absolutely no expectations here, totally in case you're interested.

@eduardofischer

This comment has been minimized.

@anthonyshew
Copy link
Contributor

@eduardofischer Please provide a reproduction or other information that would help close the issue. If you'd like to express your interest an issue, please add a 👍 reaction to the top-level. Adding "+1" comments to the issue sends notifications to everyone participating on the issue, creating noise, without helping us to get it closed.

@dalton-oliveira
Copy link

dalton-oliveira commented May 20, 2025

@anthonyshew I created this repo that reproduces the error https://github.com/dalton-oliveira/turbo-docker-prune-bun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

4 participants