Don't require scalalib to depend on javalib in the build. #3566
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change changes hierarchy of Scala Native projects.
Previously
scalalib
had dependency onjavalib
which transitively forced its dependeny on not directly usedposixlib
,windowslib
, even though all it requires isnativelib
andclib
for atomic ops.At the time of linking both
scalalib
andjavalib
have cyclic dependency on each other, however, at compile time non of each does emit.class
or.tasty
files and we only have a "weak" dependency enforced by used version of Scala compiler and provided JDK.New layout does reflect this change
What changes here is that scalalib no longer depends on javalib. Dependencies of scalalib need to explictly add dependency on javalib (done automatically in SBT plugin).
Motivation:
At some point we might follow the Scala.js path, and make
javalib
implementation independent form Scala standard library. (With minimal exceptions, likescala.Predef.classOf[T]
at that point we would no longer need to cross compile Javalib for each Scala binary version. Instead, we would be able to compile it once, publish without Scala cross version and use it with any Scala standard library combinationImmidiete improvement comming from this change is speedup of Scalalib publishing when using new model (artifact per each Scala version)