Skip to content

Conversation

jxnu-liguobin
Copy link
Collaborator

@jxnu-liguobin jxnu-liguobin commented Sep 20, 2025

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 version 4. x. Therefore, the 3.x branch only supports vulnerability fixes for non-destructive dependencies.

@jxnu-liguobin jxnu-liguobin added this to the 4.0.0 milestone Sep 20, 2025
@jxnu-liguobin jxnu-liguobin linked an issue Sep 20, 2025 that may be closed by this pull request
libraryDependencies ++= Dependencies.scalaLogging(scalaVersion.value, false),
)

lazy val `integration-test` = project.in(file("integration-test"))
Copy link
Collaborator Author

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

Copy link
Collaborator Author

@jxnu-liguobin jxnu-liguobin Sep 25, 2025

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?

Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

@SethTisue SethTisue Sep 26, 2025

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.

Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Logging Macro Doesn't Support Scala2 + Scala3 Simultaneously
2 participants