-
Notifications
You must be signed in to change notification settings - Fork 129
define the scala 2 macros in the scala 3 module #480
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
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # build.sbt
libraryDependencies ++= Dependencies.scalaLogging(scalaVersion.value, false), | ||
) | ||
|
||
lazy val `integration-test` = project.in(file("integration-test")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is expected that external dependencies should be used, especially to test CrossVersion.for2_13Use3
, Currently only local testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SethTisue I will test CrossVersion.for2_13Use3
and CrossVersion.for3Use2_13
locally and release 4.0.0-RC1
, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the motivation for testing CrossVersion.for2_13Use3
and CrossVersion.for3Use2_13
? if the library is published for both 2 and 3, then 2 users should use the 2 version, 3 users should use the 3 version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it because the macro for 2 is defined in 3? Because it's mentioned in the Scala documentation, to be honest, I'm not sure if it's necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it because the macro for 2 is defined in 3?
There's no such thing — Scala 2 macros and Scala 3 macros are entirely separate systems. There is zero interoperability of macros in either direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for clarifying. Can I merge it? I have already preserved the 3.x branch.
Continue pushing #415 forward. We still need some integration testing. It will close #415 and #350.
This implementation is also the most reasonable solution, so #350 will also be closed. Scala docs: https://docs.scala-lang.org/scala3/guides/migration/tutorial-macro-mixing.html#3-cross-validate-the-macro
This will be released together with SLF4J 2.x, Logback 1.5.x, and Java 21 in
4.0.0-RC.1
. This is considering that these dependencies are all versions that have been released for a long time. After stabilization, it will be released to version 4.0.0 and will only be developed on version4. x
. Therefore, the3.x
branch only supports vulnerability fixes for non-destructive dependencies.