sbt exclusion rules don't handle Scala version specific dependencies
See original GitHub issuesteps
"net.liftweb" %% "lift-mapper" % "2.6-M4" % "compile" excludeAll(ExclusionRule("net.liftweb", "lift-json"))
problem
"net.liftweb" %% "lift-json"
is actually not excluded (because you need cross versioned "lift-json_2.10"
).
expectation
ExclusionRule
could smart up some how, or accept GroupArtifactID
. The LHS of excludeAll
is ModuleID
so it should already know the crossVersion
mode that its in.
original report
This came up as an issue recently, referenced in this Stack Overflow post from Channing Walton. Basically, the issue is that since exclusion rules are a pretty direct mapping (as I recall, anyway) onto Ivy, they don’t include relevant information that sbt knows, such as the Scala version being referenced. So, while you can include a dependency that’s Scala specific using the %%
syntax, there’s no similar mapping available for exclusions. I’m not sure what form a solution to this might take, but at least extending it to include something along the lines of the ModuleID
support for %%
might make sense, as a start.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:20
- Comments:27 (8 by maintainers)
I’m using this workaround:
If anyone has better/cleaner ideas I’d love to hear them!
@samudurand