Skip to content

[2.x] fix: Allow dependencyTree to run despite eviction errors#8554

Merged
eed3si9n merged 6 commits intosbt:developfrom
eureka928:fix/7255-dependency-tree-eviction-errors
Jan 16, 2026
Merged

[2.x] fix: Allow dependencyTree to run despite eviction errors#8554
eed3si9n merged 6 commits intosbt:developfrom
eureka928:fix/7255-dependency-tree-eviction-errors

Conversation

@eureka928
Copy link
Copy Markdown
Contributor

Problem
When binary compatibility eviction errors occur, users cannot run dependencyTree to debug the dependency conflict because it fails with the same eviction error.

Solution
Set evictionErrorLevel and assumedEvictionErrorLevel to Level.Warn for the dependencyTreeIgnoreMissingUpdate task, allowing the dependency tree to be displayed even when eviction errors are present.

Fixes #7255

Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=42954461

@eureka928
Copy link
Copy Markdown
Contributor Author

@eed3si9n would you review this PR and give me feedback if you have any?
Thank you

@eed3si9n
Copy link
Copy Markdown
Member

Awesome. Could you also modify one of the scripted tests or add a fresh one to demonstrate the fix please?

**Problem**
When binary compatibility eviction errors occur, users cannot run
`dependencyTree` to debug the dependency conflict because it fails
with the same eviction error.

**Solution**
Set `evictionErrorLevel` and `assumedEvictionErrorLevel` to `Level.Warn`
for the `dependencyTreeIgnoreMissingUpdate` task, allowing the dependency
tree to be displayed even when eviction errors are present.

Fixes sbt#7255
Add a scripted test that verifies dependencyTree works despite binary
incompatible eviction errors, demonstrating the fix for sbt#7255.

The test creates a controlled eviction scenario using local modules:
- base 1.0.0 and 2.0.0 with early-semver versioning
- middle depends on base 1.0.0
- app depends on middle + base 2.0.0 (eviction conflict)

Before the fix, dependencyTree would fail with the eviction error.
After the fix, it displays the tree with eviction shown as warning.
@eureka928 eureka928 force-pushed the fix/7255-dependency-tree-eviction-errors branch from 422ba66 to 04a2793 Compare January 16, 2026 02:33
Use Def.uncached for the checkDependencyTree task and remove
the unused checkEvictionError task that caused HashWriter errors.
Use external Maven dependencies (fs2-core + cats-effect) to create
eviction scenario instead of multi-project local publish approach.
This is simpler and avoids task caching issues.
@eureka928
Copy link
Copy Markdown
Contributor Author

@eed3si9n this might fix the whole ci process, please review again
Thank you!

eureka928 and others added 2 commits January 16, 2026 04:18
Remove empty comment lines that cause parsing errors.
Scripted test format doesn't support standalone '#' lines.
@eureka928
Copy link
Copy Markdown
Contributor Author

Can you allow testing for this ci workflow?

@eureka928
Copy link
Copy Markdown
Contributor Author

@eed3si9n passed the testing!

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.

Thanks!

@eed3si9n eed3si9n merged commit 79c60ca into sbt:develop Jan 16, 2026
14 checks passed
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.

dependencyTree should not fail on binary compatibility issues

2 participants