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

Support mixing scala 2.13 and scala 3 macros #179

Open
gregghz opened this issue Nov 26, 2024 · 0 comments
Open

Support mixing scala 2.13 and scala 3 macros #179

gregghz opened this issue Nov 26, 2024 · 0 comments

Comments

@gregghz
Copy link

gregghz commented Nov 26, 2024

Support mixing scala 2.13 and scala 3 macros as described here.

This would allow scala 2.13 and 3.x modules to depend on sourcecode_3 instead of conditionally choosing one or the other. The main upside is this makes incrementally upgrading to scala 3 possible.

To illustrate, assume I have the following 3 modules that all depend on sourcecode directly:

moduleA: a scala 2.13 project that depends on moduleB and moduleC
moduleB: a scala 2.13 library
moduleC: a scala 3 library

moduleB and moduleC must both depend on the same artifact (sourcecode_2.13 or sourcecode_3) or risk having two versions of sourcecode on the classpath at runtime (sourcecode_2.13 and sourcecode_3) when running moduleA.

Since scala 2.13 can't use scala 3 macros and scala 3 can't normally use scala 2.13 macros the only option would be to either leave all modules at scala 2.13 or ugprade all of them to scala 3 all at once. However, if the concept described in the link above is implemented, we would be able to depend on sorucecode_3 from all modules and still use either scala 2.13 or scala 3. This would make incrementally moving to scala 3 much easier, especially for a large code base with thousands of modules depending on sourcecode (directly and indirectly).

@gregghz gregghz changed the title Support mixing scala 2.13 and scala 3 Support mixing scala 2.13 and scala 3 macros Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant