-
Notifications
You must be signed in to change notification settings - Fork 1k
dependencyTree should not fail on binary compatibility issues #7255
Description
steps
Run update. Get an error like this:
> update
[error] stack trace is suppressed; run last update for the full output
[error] (update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error] * com.github.jwt-scala:jwt-json-common_2.13:9.3.0 (early-semver) is selected over 7.1.4
[error] +- com.github.jwt-scala:jwt-play-json_2.13:9.3.0 (depends on 9.3.0)
[error] +- com.github.jwt-scala:jwt-spray-json_2.13:7.1.4 (depends on 7.1.4)
[error]
[error]
[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel
[error] Total time: 1 s, completed 17 May 2023, 2:26:35 pm
Have a look at your build file. I can't see anywhere that that jwt-spray-json is being brought in, must be a transitive dependency. Ok, I have to look at my dependency tree. Let's try that:
> dependencyTree
[error] stack trace is suppressed; run last dependencyTreeIgnoreMissingUpdate for the full output
[error] (dependencyTreeIgnoreMissingUpdate) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error] * com.github.jwt-scala:jwt-json-common_2.13:9.3.0 (early-semver) is selected over 7.1.4
[error] +- com.github.jwt-scala:jwt-play-json_2.13:9.3.0 (depends on 9.3.0)
[error] +- com.github.jwt-scala:jwt-spray-json_2.13:7.1.4 (depends on 7.1.4)
[error]
[error]
[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel
[error] Total time: 0 s, completed 17 May 2023, 2:27:58 pm
problem
There's no simple way for me to debug this problem, sbt tells me about the conflict, but doesn't help me find the path to it.
expectation
dependencyTree should bypass the binary compatibility check, displaying the dependency tree regardless of whether there are binary compatibility issues, so that I can work out where this problem came from.
notes
This can be worked around by setting:
evictionErrorLevel := Level.Warn
But given that dependencyTree exists for the purpose of debugging problems like this, you shouldn't have to change your build file like that just to debug the problem.