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

Add page about Scala 2 -Xsource:3 to migration guide #2966

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Feb 12, 2024

No description provided.

@lrytz lrytz changed the title Add page about Scala 2 -Xsoruce:3 to migration guide Add page about Scala 2 -Xsource:3 to migration guide Feb 12, 2024
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 notice the 2.13.13 mention here, should I wait until that is released officially?

@SethTisue
Copy link
Member

Yeah I'll do the final merge here.

_overviews/scala3-migration/tooling-scala2-xsource3.md Outdated Show resolved Hide resolved
The [`@nowarn` annotation](https://www.scala-lang.org/api/current/scala/annotation/nowarn.html) can be used to suppress individual warnings, which also works with fatal warnings enabled.

The Scala 2.13 compiler implements quick fixes for many Scala 3 migration warnings.
Quick fixes are displayed in Metals-based IDEs (not yet in IntelliJ), and they can be applied directly to the source code using the `-quickfix` flag, for example `-quickfix:cat=scala3-migration`.
Copy link
Member

Choose a reason for hiding this comment

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

Not yet in IntelliJ? Really? Is there a ticket somewhere tracking that?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, if we find one we should add it to scala/scala3#14904

@SethTisue SethTisue merged commit 604b354 into scala:main Feb 28, 2024
1 check failed
@SethTisue
Copy link
Member

new page is online: https://docs.scala-lang.org/scala3/guides/migration/tooling-scala2-xsource3.html

I've linked to it from the 2.13.13 release notes and posted or commented about it on both our forums and on Reddit

@lrytz
Copy link
Member Author

lrytz commented Feb 28, 2024

I wonder if we should advertise this right now, given scala/bug#12961. Moving to -Xsource:3-cross changes the encoding of every synthetic case class companion, this can cause issues.

I'll update the page. In any case, the page is entirely missing the fact that case companions are affected by 3-cross, not sure why I missed that when I wrote it.

@SethTisue
Copy link
Member

SethTisue commented Feb 28, 2024

I'll update the page.

👍

I figured it was okay to publish and link to, because in the short run 99% of page visitors will have come there from the 2.13.13 release notes, which already highlight 12961. But yes, of course it would be best if we update it reasonably promptly.

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