Repository navigation
fix(manifest): cover recursive build roots by build file, not directory - #1620
Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Conversation
Recursive facts generation and the recursive setup wizard skipped a discovered build root whenever its directory was a subproject of an already-processed build, tracked separately per ecosystem. A directory shared by a module of one build and an independent build of the same tool (e.g. a reactor module declared as `sub/alt.xml` next to a standalone `sub/pom.xml`) was therefore never generated. Coverage is now a single set of the build files each processed build reports for its projects (`manifestFiles`); a root is skipped only when one of its own build files is in it. Files outside the build root or absent on disk never count. - The workspace-enumeration scripts emit `buildRoot` and `projectBuild` records, so the setup wizard uses the same rule. - sbt projects also list their base directory's `build.sbt`: sbt loads it into that project even when it sets nothing, which setting positions alone miss.
This branch has not been deployed
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.
LLM Description written by Claude Code:claude-opus-5-5
socket manifest dynamic-sbom-inference,--dynamic-sbom-inferenceand the recursive setup wizard skip a discovered build root that another build already includes. That coverage was tracked per ecosystem by directory, so an independent build sharing a directory with a module of another build of the same tool was never generated, e.g. a reactor module declared as<module>sub/alt.xml</module>hid a standalonesub/pom.xml.Coverage is now one tool-agnostic set of build files: the
manifestFileseach processed build reports for its projects. A root is skipped only when one of its own build files is in the set. Files outside the build root (sibling modules, relocated Gradle projects) or absent on disk (Gradle reports configured build files that don't exist) never count.Changes outside the coverage logic:
buildRootandprojectBuildrecords, so the setup wizard uses the same rule and resolves paths against the real build root.manifestFilesnow also includes its base directory'sbuild.sbtwhen present. sbt loads that file into the project (Load.configurationSources) even when it defines nothing scoped to it, which setting positions alone miss; without it, a subproject with an emptybuild.sbtwould be generated again as its own build. Other*.sbtfiles are not added. Coana and depscan will see this extra entry for such subprojects.Testing:
build.sbt, absent Gradle build files, and the wizard; the co-located case fails on the old code.test/run-compat.shmatrix passes for Gradle 1.12–9.2.1, Maven 3.2.5–4.0.0-rc-6 and sbt 0.13.18–1.9.9, with the workspace smoke tests now asserting the new records.dynamic-sbom-inferenceruns on small Maven, Gradle and sbt builds exercising each case above.Note
Medium Risk
Changes which Maven/Gradle/sbt roots get SBOMs in monorepos and co-located layouts; behavior is narrower (fewer false skips) but affects scan/fix dynamic inference paths.
Overview
Fixes recursive JVM build-root skipping for
socket manifest dynamic-sbom-inference,--dynamic-sbom-inference, and the recursive setup wizard.Coverage is now keyed by build files, not directories. After each facts run, the walker records the existing
manifestFilesreported for that build (resolved against the real build root). A later candidate is skipped only if one of its ecosystem marker files (pom.xml,build.gradle,build.sbt, etc.) is already in that set. Independent builds that share a folder with a reactor module (e.g. reactor usesshared/alt.xmlbutshared/pom.xmlis separate) are generated again; sibling or relocated modules outside the build root are not suppressed; Gradle-reported build files that are missing on disk do not count.Workspace enumeration (Gradle init script, sbt workspaces plugin, Maven extension) now emits
buildRootandprojectBuildso setup uses the same rule;enumerateWorkspacesrequiresbuildRootand fails closed without it. sbt facts also attach each subproject’s basebuild.sbttomanifestFileswhen present, so empty memberbuild.sbtfiles are covered by the parent run.Help text, changelog, compat smoke tests, and unit tests cover co-located builds, absent Gradle files, and relocated roots.
Reviewed by Cursor Bugbot for commit 66fb96d. Configure here.