Skip to content
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

Disambiguate compiler-interface module name #1215

Conversation

alexarchambault
Copy link
Collaborator

@alexarchambault alexarchambault commented Sep 9, 2021

It's compiled only in Scala 2, and used via dotty compat in Scala 3. For Scala 2, it depends on Scala 2 pprint. For Scala 3, it depends on Scala 3 pprint.

Without these changes, only the latter module ends up being published, which makes ammonite for 2.13.6 pull pprint for Scala 3 (along with pprint for Scala 2), which is a problem.

Also, the same module (com.lihaoyi:ammonite-compiler-interface_2.13.6) was built and published twice. A few commits ago, these were published in the same batch, so only one (apparently the latter) ended up actually published. Since two commits on master, these are published in separate batches, which makes one of them fail (because it tries to publish a module already published by the other batch).

With the changes here, we now publish com.lihaoyi:ammonite-compiler-interface_2.13.6 (for Scala 2) and com.lihaoyi:ammonite-cross-23-compiler-interface_2.13.6 (for Scala 3), which solves the ambiguity.

Fixes #1214.

Fixes #1197 (hopefully).

It's compiled only in Scala 2, and used via dotty compat in Scala 3.
For Scala 2, it depends on Scala 2 pprint. For Scala 3, it depends on
Scala 3 pprint.

Without these changes, only the latter module ends up being published,
which makes ammonite for 2.13.6 pull pprint for Scala 3 (along with
pprint for Scala 2), which is a problem.

Without these changes, the same module
(com.lihaoyi:ammonite-compiler-interface_2.13.6) was built and published
twice. A few commits ago, these were published in the same batch, so
only one (apparently the latter) ended up actually published. Since two
commits on master, these are published in separate batches, which makes
one of them fail (because it tries to publish a module already published
by the other batch).
@alexarchambault
Copy link
Collaborator Author

alexarchambault commented Sep 9, 2021

Not sure why I didn't just built compiler-interface with Scala 3, instead of compiling it with Scala 2 and using it from Scala 3 via dotty-compat… Will probably try that in a later PR.

@alexarchambault alexarchambault merged commit f3d8171 into com-lihaoyi:master Sep 9, 2021
@alexarchambault alexarchambault deleted the disambiguate-cross-compiled-module branch September 9, 2021 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant