Take a monorepo's members from the workspace, not from a scan - #2166
Merged
Conversation
Looking for manifests finds every one there is, which is more than the workspace has members: Babel's repository declares 162 packages and holds 205 directories with a package.json, the surplus being test fixtures. Tokio's fuzzing crates are excluded from its workspace on purpose and were reported all the same. Where a repository declares its members in a form that can be read without running the build tool - pnpm, npm/yarn/bun, Cargo, go.work - that list is now used instead. Measured against the real repositories, the result matches each tool's own answer exactly: babel 162, vue 17, tokio 10. The scan stays as the fallback rather than being retired, because Gradle assembles its module list in a Kotlin program and Bazel in Starlark; neither can be parsed, and junit-framework is the case in point - no declared list, 21 subprojects found by scanning. `projectile-subproject-functions' is the seam, tried in order until one answers, so a workspace format Projectile cannot read can be taught from the outside.
They exercise the real scan, which under the default alien method shells out to git - and the sandbox is not a repository of its own, so CI's checkout failed the command where a local run happened not to.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scanning for manifests finds every one there is, which is more than a workspace has members. Babel declares 162 packages but holds 205 directories with a
package.json- the surplus is test fixtures. Tokio's fuzzing crates are excluded from its workspace on purpose and got reported anyway.Where a repository declares its members in a form readable without running the build tool - pnpm, npm/yarn/bun, Cargo,
go.work- that list is used instead. Against the real repos the result matches each tool's own answer exactly: babel 162, vue 17, tokio 10.The scan stays as the fallback rather than being retired. Gradle assembles its module list in a Kotlin program and Bazel in Starlark, so neither can be parsed statically - junit-framework is the case in point, with no declared list and 21 subprojects found by scanning.
projectile-subproject-functionsis the seam, tried in order until one answers.