Skip to content

Support mixing scala 2.13 and scala 3 macros #179

Open
@gregghz

Description

@gregghz

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions