New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automatically provide dependencyOverrides for all scala-lang modules #2286
Comments
Agreed. On Tue, 24 Nov 2015 20:54 Sam Halliday notifications@github.com wrote:
|
I don't know if the binary compatibility is guaranteed for using Scala compiler or scalap across minor releases. |
If json4s 3.2 depended on a particular version of scalap and if scalap changed the ABI, wouldn't this break json4s? (json4s 3.3 forked scalap to avoid this I think) |
"Binary compatible" does not mean "compatible". They're supposed to be and probably are binary compatible. That still leaves an infinity of bugs to be discovered by mixing and matching jars from different scala versions. |
I agree. The current law of the land on Maven/Ivy ecosystem is JAR swapping, and that's all we do. |
There are zero situations where you should mix jars from different releases. It ought to be possible to avoid adding any options, or at least an option which bears on this should be a lot more general. |
scala-library promises binary compatibility between the patches. Many projects knowingly or unknowingly bump up scala-library versions as long as they are within the same major version series such as 2.11. This should imply that the tie between scala-compiler and scala-library is not that tight either, even though it feels wrong. On the other hand, libraries such as json4s 3.2.11 (https://repo1.maven.org/maven2/org/json4s/json4s-core_2.11/3.2.11/json4s-core_2.11-3.2.11.pom) makes use of scalap, which depends on scala compiler probably shouldn't be swapped since scala compiler I don't think makes promise of being swappable. json4s 3.2.11 depends on scalap 2.11.0 according to the pom. It's conceivable that someone wants to bump up scala-library to 2.11.7 for a bug fix etc but not want to bump up scala-compiler version to 2.11.7. |
It doesn't. By happenstance it will usually work, just like code which is full of data races will usually work. I have nothing to say about scalap, it is an uninteresting outlier. There are three jars of interest: library, reflect, compiler. Anyone who mixes these jars across versions is doing it wrong. That you can dream up multipronged situations like a bug fixed in the library while a new bug was introduced into the compiler and there is no workaround in either case is like planning around asteroid strikes. There is no reason to present this as yet another matter for individual configuration. Let the hypothetical people who need to override the behavior do so by performing some ridiculous hack of the sort I'm always having to do. |
@eed3si9n "that's all we do"? i have this line in each and every build.sbt: (for my own projects, i'd like to make it a bit less strict and accept changes in the minor version, but afaik that can't be done with sbt any more) |
@ritschwumm Right. I should have mentioned The middle ground solution that I am seeking is automatically deducing which ties between the ModuleID is stronger given a version conflict. Maven picks the nearest. Ivy picks the latest (with some degree of Maven emulation for POMs). The popular opinion seems to be that scala toolchain is a special case. One argument that I can make for that opinion is that |
Comment on #2634 would be most welcome. |
Fixed in #2634. |
if a project uses a particular version of scala, but a transitive dependency uses one of the scala-lang optionals (compiler, scalap, reflect, etc) then the older version is used. It would be good if something like this was automatic
The text was updated successfully, but these errors were encountered: