Skip to content

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

Merged
merged 2 commits into from
Apr 30, 2020

Conversation

nicolasstucki
Copy link
Collaborator

No description provided.

@nicolasstucki nicolasstucki force-pushed the add-macro-migration-outline branch from 3494f64 to a328e98 Compare April 30, 2020 08:41
@@ -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:

Copy link
Collaborator Author

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*
Copy link
Collaborator Author

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.

Copy link
Contributor

@plokhotnyuk plokhotnyuk Apr 30, 2020

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

Copy link
Collaborator Author

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?

Copy link
Member

@adpi2 adpi2 left a 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.

@adpi2 adpi2 merged commit b67068a into scalacenter:master Apr 30, 2020
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

Successfully merging this pull request may close these issues.

3 participants