Conversation
|
The repository here has not been updated for a long time and there are problems with ci. Do we should continue updating here? |
| } | ||
| ): undefined | ((pkgName: string) => boolean) { | ||
| if (opts.onlyBuiltDependenciesFile || opts.onlyBuiltDependencies != null) { | ||
| if (opts.onlyBuiltDependenciesFile || opts.onlyBuiltDependencies?.length) { |
There was a problem hiding this comment.
This is not correct. If the array is empty it means that no dependencies are allowed to be built.
There was a problem hiding this comment.
This will cause all normal dependencies to be added to ignoredBuilds when executing pnpm rb, resulting in the problem mentioned in pnpm/pnpm#9129.
https://github.com/pnpm/pnpm/blob/bc0d00f46c0dbaa09c27d29b71f0d969d089eb44/exec/plugin-commands-rebuild/src/implementation/index.ts#L354
https://github.com/pnpm/pnpm/blob/bc0d00f46c0dbaa09c27d29b71f0d969d089eb44/exec/plugin-commands-rebuild/src/implementation/index.ts#L171
There was a problem hiding this comment.
If all builds are ignored, then pnpm rebuild should build nothing.
There was a problem hiding this comment.
In this case, pnpm rebuild will add all dependencies that do not need to execute lifecycle scripts to ignoredBuilds and write them to the .modules.yaml file, causing pnpm approve-builds to list these dependencies.
|
I didn't review this PR to see if it fixes the issue - but just wanted to post my comment here that I was also able to reproduce the issue that this is trying to solve: pnpm/pnpm#9129 (comment). |
refs pnpm/pnpm#9129