-
Notifications
You must be signed in to change notification settings - Fork 49
Add outline for macro migration #8
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
Add outline for macro migration #8
Conversation
3494f64
to
a328e98
Compare
@@ -9,13 +9,55 @@ Scala 3 will break this limitation but it comes with the cost of rewriting all t | |||
While being experimental, the Scala community has largely adopted the Scala 2 [Def Macro](https://docs.scala-lang.org/overviews/macros/overview.html) feature in multiple of ways: code generation, optimizations, ergonomic DSLs... | |||
|
|||
Here is an incomplete list of libraries that use Scala 2 macros and their migration status: | |||
|
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.
@anatoliykmetyuk, after this PR is merged, could you fill in this list with all the latest progress you did in the community build?
If you are already cross-compiling your macro for different versions of Scala 2 and you have sources folders for each version, then you can add an extra source folder for Scala 3. | ||
|
||
* SBT examples: | ||
* *TODO find a simple example project* |
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.
@anatoliykmetyuk @liufengyun do we have a simple project that uses this scheme in the community-build?
I know about scalatest but its build is to complex.
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.
@nicolasstucki I have a tiny project with a single macro call for evaluation of constants. Here is my currently failed attempt to add Scala 3 support for it: https://github.com/plokhotnyuk/expression-evaluator/pull/40/files
Also, a good small candidate would be the macrolizer library. cc/ @sirthias
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.
@anatoliykmetyuk could you have a look at those?
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.
Thanks @nicolasstucki for this PR!
Macro is one of the big change in Scala 3. Those preliminary guidelines are much valuable to push the migration forward.
Looking forward to the list of macro projects in the community build.
Co-Authored-By: Adrien Piquerez <[email protected]>
No description provided.