Separate Scala REPL classpath from user dependencies #2607
Merged
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.
Fixes #2582
This separates the Scala REPL classpath from user dependencies classpath, preventing clashes and unintended bumps of compiler dependencies.
This also allows to use the recent
jna
version on the Scala REPL withaarch64
Java releases, for more details read #2582 (comment)NOTE: this only separates the Scala REPL, and not the Ammonite REPL.
Ammonite REPL does not support a
--classpath
argument.It would likely be possible to either exclude transitive compiler dependencies in the user dependencies when launching the Ammonite REPL, or preload deps with a script to prevent clashes there, too.
However, as the Ammonite REPL does not have much in terms of dependencies in the first place, this is perhaps not much of an issue, really.
Isolating the Ammonite REPL classpath is out of the scope of this PR, either way.