Skip to content
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

pnpm patches incorrectly excluded on turbo prune #9120

Open
1 task done
kalvenschraut opened this issue Sep 6, 2024 · 2 comments
Open
1 task done

pnpm patches incorrectly excluded on turbo prune #9120

kalvenschraut opened this issue Sep 6, 2024 · 2 comments
Labels
area: prune turbo prune kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@kalvenschraut
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/RTVision/turborepo-prune-patch-issue

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Which canary version will you have in your reproduction?

2.1.2-canary.0

Describe the Bug

patches are being remove from the pruned workspace when app depends on the package.

Expected Behavior

all patches for dependent libraries be included in the prune of an app.

To Reproduce

clone the repo and run pnpm turbo prune --scope=web and then open up out/pnpm-lock.yaml and see the next patch is no longer present even though it is the base pnpm-lock.yaml file and web depends on next

Additional context

pnpm recently added a feature that allows trying to apply the same patch to all versions of a package which was added in pnpm 9.7. Because of that the patch doesn't have a version in the file name or in the lockfile which I suspect is causing not to be added during the prune. This is the default way pnpm generates patch files now so any new patches done are no longer being kept around.

@kalvenschraut kalvenschraut added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Sep 6, 2024
@kalvenschraut kalvenschraut changed the title pnpm patch files incorrectly excluded on turbo prune pnpm patches incorrectly excluded on turbo prune Sep 6, 2024
@chris-olszewski chris-olszewski added the area: prune turbo prune label Sep 10, 2024
@liam-germain
Copy link

liam-germain commented Sep 13, 2024

hi is this bug related to why i can't run even the 'with-docker' example with it failing on:

web:build: cache miss, executing e9bd4163eb4a2003
0.347 x internal errors encountered: unable to find package manager binary: cannot
0.347 | find binary path

Everything works great when using yarn but fails when using pnpm

@ideatrails
Copy link

I too just sunk too much time trying to integrate the with-docker starter example into an existing repo running on pnpm.
I finally tried the raw examples and discovered both the npm and yarn versions work, but as liam-germain suggests, the with-docker example does not work with pnpm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: prune turbo prune kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

4 participants