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

Document migration to Scala 3 Underscore Type Lambdas syntax and cross-compiling with kind-projector #203

Merged
merged 1 commit into from
May 12, 2021

Conversation

neko-kai
Copy link
Contributor

@neko-kai neko-kai commented May 10, 2021

@neko-kai
Copy link
Contributor Author

/cc @adpi2 @smarter

Comment on lines +23 to +25
To use underscores for type-lambdas in existing kind-projector enabled code, replace `*` or `?` type lambda placeholders with `_`.

In turn, you will also have to rewrite all usages of `_` as the wildcard to use `?` symbol.
Copy link

Choose a reason for hiding this comment

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

In case are scalafix rules available for these rewrites, would be good to mention / link them.

Copy link
Member

Choose a reason for hiding this comment

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

I don' think we have a Scalafix rule but we have a compiler rewrite with -source:future-migration -rewrite.
However, it also patches some other patterns that could break the compatibility with Scala 2.13. So I am not sure if it is worth mentioning.
I once did the inventory of the -source:future-migration rewrite rules but it has not been updated for some time: https://github.com/scalacenter/scala-3-migration-guide/tree/main/incompat-31

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.

@neko-kai Thanks a lot for this contribution!
The migration guide has been recently moved to https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html
So I will merge this, move it to docs.scala-lang and then deprecate this website.

@adpi2 adpi2 merged commit 9c4d401 into scalacenter:main May 12, 2021
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.

None yet

3 participants