Repository navigation
fix(manifest): leave a component with a missing artifact file without targets - #1644
Conversation
89d3769 to
500ea3f
Compare
Martin Torp (mtorp)
left a comment
There was a problem hiding this comment.
[agent] Approving, with one inline note.
One note for the whole stack. The Maven, Gradle and sbt compat suites are the only tests that exercise most of the new producer code, and none of them run in CI (only the TS unit tests, lint, types and e2e do). A lot of this code leans on build-tool internals: the resolver's collector and trace layout, copies of JavaScopeDeriver and ClassicDependencyManager, coursier's cache layout, Ivy's report files and Gradle's error text. A slim matrix in CI or a nightly job, one old and one current version per tool, would catch it when one of those shifts.
… targets Reachability reads a sidecar component with no targets as not installed, and targets: [] as resolved with no artifact. A component whose files were partly gone from disk got the surviving subset, and one with none got an empty list, so it looked resolved. Producers can now mark an artifact they could not fetch with an unfetched record, and any such or missing file leaves the component without targets.
An unfetched or missing file in one resolution root dropped the targets of the coordinate for every root, so a jar one module fetched looked uninstalled when another module failed it. A coordinate now keeps the files of every root that fetched all of them, and is left without targets only when no root did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
500ea3f to
9701546
Compare
|
[agent] On running the compat suites in CI: agreed, they're the only coverage for the build-tool internals. They can't run on GitHub Actions today because SocketDev's action allowlist forbids |
LLM Description written by Claude Code:claude-opus-5-5
Reachability reads a sidecar component with no
targetsas not installed, andtargets: []as resolved with no artifact. A component whose files were gone from disk got the surviving subset, or an empty list, so it looked resolved.unfetchedrecord lets a producer mark an artifact it could not fetch. Nothing emits it yet; the Maven, Gradle and sbt PRs above do.targets.Testing: new assembler/sidecar unit test.
🤖 Generated with Claude Code
Note
Medium Risk
Changes how reachability classifies JVM dependencies when jars are missing or unfetched; incorrect marking could skip or mis-analyze dependencies, but scope is limited to facts/sidecar assembly with new tests.
Overview
JVM Socket facts assembly now distinguishes unresolved artifacts from resolved-but-empty ones in reachability sidecars. A new
unfetchedline-protocol record (for Maven/Gradle/sbt producers) marks coordinates whose jars could not be fetched; assembly also treats any listed classpath file that is missing on disk as incomplete.External components with a partial or missing artifact no longer emit
targets(or an empty subset).targets: []still means resolved with no jar (e.g. a BOM).targetsomitted means not installed—so reachability will not treat broken or unfetched deps as fully resolved.Types and
attachPathsin the sidecar path were updated soResolvedArtifactPaths.targetsis optional; a unit test covers unfetched, missing files, and multi-classifier cases.Reviewed by Cursor Bugbot for commit 89d3769. Configure here.