Skip to content
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

Clearer points in favour of macro mixing #2970

Merged
merged 3 commits into from
Feb 14, 2024
Merged

Conversation

johnduffell
Copy link
Contributor

This PR updates the scala 3 migration docs to emphasis the benefits of macro mixing rather than indicating that it's experimental.

--

The background is as follows:

We are trying to update our code gradually to scala 3. In one case we have a large multi project build which produces many semi-related jar files for deployment into AWS lambda.

I am trying to update this module by module, but I quickly hit an issue where play-json had scala 2.13 and 3 versions.

Normally I would just force version 3 and use -Ytasty-reader, however in this case because it's a macro library, the modules remaining on scala 2.13 didn't compile any more.

I proposed adding macro mixing to the library, but this was pushed back on the basis that it wasn't necessary and is not promoted by the docs. See the issue below:
playframework/play-json#954

I think this is not really accurate (is it?) and I think this is going to be a blocker for all of our larger repos in our company, and possibly other organisations.

Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised to see the phrasing "Experimental" in the old doc. The only caveat there is if the macro implementation method was compiled by Scala 3 then you can't use things like quasiquotes or eval, but if the macro method is in a separate 2.13 compiled module then this is no issue

@sjrd sjrd merged commit 5f18650 into scala:main Feb 14, 2024
@johnduffell johnduffell deleted the patch-1 branch February 14, 2024 22:42
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