Skip to content

[2.x] fix: Unresolved dependency error for Coursier#8869

Merged
eed3si9n merged 3 commits intosbt:developfrom
bitloi:fix-5168-unresolved-dependency-path
Mar 3, 2026
Merged

[2.x] fix: Unresolved dependency error for Coursier#8869
eed3si9n merged 3 commits intosbt:developfrom
bitloi:fix-5168-unresolved-dependency-path

Conversation

@bitloi
Copy link
Copy Markdown
Contributor

@bitloi bitloi commented Mar 3, 2026

Summary

Fixes unresolved dependency path reporting for Coursier (ResolveException.failedPaths) and adds a stable scripted regression.

This PR addresses #5168 by reconstructing unresolved dependency caller chains from the Coursier resolution graph and attaching them to ResolveException.failedPaths. That allows unresolved warnings to show the full path from the missing module up to the root project.

It also adds and stabilizes lm-coursier/unresolved-path scripted coverage by:

  • using a local test Maven repo fixture (no flaky remote test dependency)
  • checking update stream output via an sbt task (checkLog) instead of shell grep
  • asserting the unresolved path includes missing module, transitive caller, and root project

Related Issues

Fixes #5168

Reproduction / Verification

  1. Run:
    ./sbt "lmCoursier/test"
  2. Run:
    ./sbt "scripted lm-coursier/unresolved-path"
  3. Confirm scripted output contains unresolved-path entries with:
    • com.example.repo:missing:1.0
    • com.example.repo:a:1.0
    • com.example:... (root project)

Testing

  • Added/updated tests:
    • lm-coursier/src/test/scala/lmcoursier/ResolutionSpec.scala
    • sbt-app/src/sbt-test/lm-coursier/unresolved-path/build.sbt
    • sbt-app/src/sbt-test/lm-coursier/unresolved-path/test
    • sbt-app/src/sbt-test/lm-coursier/unresolved-path/repo/com/example/repo/a/1.0/a-1.0.pom
    • sbt-app/src/sbt-test/lm-coursier/unresolved-path/repo/com/example/repo/a/1.0/a-1.0.jar
  • Ran targeted unit tests:
    • ./sbt "lmCoursier/test"
  • Ran targeted scripted regression:
    • ./sbt "scripted lm-coursier/unresolved-path"

Checklist

  • Code follows project style
  • Focused regression test added
  • Targeted unit/scripted tests pass

@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Mar 3, 2026

@eed3si9n Ready for review.

Copy link
Copy Markdown
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the contribution.

@eed3si9n eed3si9n changed the title fix: include transitive caller chain in Coursier unresolved dependency paths [2.x] fix: Unresolved dependency error for Coursier Mar 3, 2026
@eed3si9n eed3si9n merged commit 09c4856 into sbt:develop Mar 3, 2026
15 checks passed
eed3si9n pushed a commit to eed3si9n/sbt that referenced this pull request Mar 23, 2026
Fixes unresolved dependency path reporting for Coursier (`ResolveException.failedPaths`) and adds a stable scripted regression.

This PR addresses 5168 by reconstructing unresolved dependency caller chains from the Coursier resolution graph and attaching them to `ResolveException.failedPaths`. That allows unresolved warnings to show the full path from the missing module up to the root project.

It also adds and stabilizes `lm-coursier/unresolved-path` scripted coverage by:
- using a local test Maven repo fixture (no flaky remote test dependency)
- checking update stream output via an sbt task (`checkLog`) instead of shell `grep`
- asserting the unresolved path includes missing module, transitive caller, and root project
eed3si9n added a commit that referenced this pull request Mar 23, 2026
Fixes unresolved dependency path reporting for Coursier (`ResolveException.failedPaths`) and adds a stable scripted regression.

This PR addresses 5168 by reconstructing unresolved dependency caller chains from the Coursier resolution graph and attaching them to `ResolveException.failedPaths`. That allows unresolved warnings to show the full path from the missing module up to the root project.

It also adds and stabilizes `lm-coursier/unresolved-path` scripted coverage by:
- using a local test Maven repo fixture (no flaky remote test dependency)
- checking update stream output via an sbt task (`checkLog`) instead of shell `grep`
- asserting the unresolved path includes missing module, transitive caller, and root project

Co-authored-by: bitloi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unresolved resolution graph error

2 participants