Skip to content

Take a monorepo's members from the workspace, not from a scan - #2166

Merged
bbatsov merged 2 commits into
masterfrom
feature/subprojects-from-manifest
Aug 20, 2026
Merged

Take a monorepo's members from the workspace, not from a scan#2166
bbatsov merged 2 commits into
masterfrom
feature/subprojects-from-manifest

Conversation

@bbatsov

@bbatsov bbatsov commented Aug 20, 2026

Copy link
Copy Markdown
Owner

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-functions is the seam, tried in order until one answers.

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.
@bbatsov
bbatsov merged commit dd09605 into master Aug 20, 2026
10 checks passed
@bbatsov
bbatsov deleted the feature/subprojects-from-manifest branch August 20, 2026 13:10
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.

1 participant