Repository navigation
fix(manifest): attach Maven relocation targets in sbt facts - #1685
Conversation
Jeppe Fredsgaard Blaabjerg (jfblaa)
marked this pull request as ready for review
November 1, 2026 09:23
Oskar Haarklou Veileborg (BarrensZeppelin)
approved these changes
Nov 2, 2026
Coursier reports a relocation target with the relocating module as its caller, but leaves that module out of the update report, so the target had no parent and the facts run failed. Read the relocation from the POMs and attach the target to whoever declared the relocating module: the project, a dependsOn project, or a library POM that passes it on.
Jeppe Fredsgaard Blaabjerg (jfblaa)
force-pushed
the
jfblaa/rea-1056-sbt-facts-a-maven-relocation-fails-the-facts-run
branch
from
November 2, 2026 12:44
0e0bcce to
547dc35
Compare
Jeppe Fredsgaard Blaabjerg (jfblaa)
deleted the
jfblaa/rea-1056-sbt-facts-a-maven-relocation-fails-the-facts-run
branch
November 2, 2026 12:47
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
REA-1056. A Maven relocation (e.g.
mysql:mysql-connector-java) made sbt facts fail withResolved dependencies of <project> are not reachable: coursier reports the target with the relocating module as its caller, but leaves that module out of the report. The plugin now reads the relocation POMs and attaches the target to whoever declared the relocating module:dependsOnproject, likewise;The target may resolve to a different version than the relocation names (conflict resolution, overrides). Ivy keeps the relocating module and is unaffected.
Tested:
run-compat.sh sbt(0.13.18 to 1.9.9, plus Ivy). A new relocation fixture covers a direct declaration, a version range, a version override, adependsOndeclarer and a test-scoped library declaration; it fails onv1.x.make-stub-repo.shgains relocation POMs, dependency scopes andmaven-metadata.xml.🤖 Generated with Claude Code
Note
Medium Risk
Changes sbt dependency graph emission for Coursier-backed builds via new POM parsing and heuristic parent linking; wrong edges could skew SBOM/reachability, but behavior is scoped to missing relocation callers and is covered by the compat matrix.
Overview
Fixes sbt Socket facts / SBOM generation when dependencies use Maven relocations (e.g.
mysql:mysql-connector-java). Coursier resolves the target artifact but omits the relocating module and its caller from the update report, which broke dependency reachability and failed the run.The sbt plugin
socket-facts.plugin.scalanow reconstructs caller edges when a missing caller is a relocation: it reads cached POMs (relocation blocks, inherited dependencies, managed scopes, BOM imports) and links the target to who actually declared the old coordinate—the root project, adependsOnsubproject (using reached configs), or a transitive library whose POM passes the dependency on at compile/runtime and is not optional. Ivy is unchanged.PomPackagingis expanded for this POM work; jar-vs-pom-only handling reuses the same parser.Compat tests add relocation stubs (
make-stub-repo.sh: relocation specs,@scopedeps,maven-metadata.xml), extend the smoke project, a multi-module relocation fixture, andsmoke-test-relocation.shwired intorun-compat.sh. Changelog and.gitignorecover the new generated paths.Reviewed by Cursor Bugbot for commit 0e0bcce. Configure here.