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 support for Scala 3 #46

Closed
Flowdalic opened this issue Jun 10, 2021 · 4 comments · Fixed by #47
Closed

Add support for Scala 3 #46

Flowdalic opened this issue Jun 10, 2021 · 4 comments · Fixed by #47

Comments

@Flowdalic
Copy link

Flowdalic commented Jun 10, 2021

It appears mill-scalafix 0.2.2 does not yet support Scala 3. At least, as soon as I change the scalaVersion to 3, I get

Resolution failed for 1 modules:
--------------------------------------------
  org.scalameta:semanticdb-scalac_3.0.0:4.4.10

when running mill on my project. Commenting out mill-scalafix makes the issue disappear.

@joan38
Copy link
Owner

joan38 commented Jun 10, 2021

Thanks for the ticket but for now not even scalafix supports Scala 3 scalacenter/scalafix#1316 and I don't think semanticdb supports Scala 3 yet.

Scala Steward will automatically update these once they are published.

@olafurpg
Copy link

The semanticdb-scalac compiler plugin does not exist for Scala 3 because the Scala 3 compiler has built-in SemanticDB support. You can remove the dependency on semanticdb-scalac and add -Xsemanticdb compiler option instead. The latest release of Scalafix supports Scala 3 https://contributors.scala-lang.org/t/scalafix-0-9-28-with-support-for-scala-3/5091 However, note that Scalafix rules that depend on compiler diagnostics (for example, RemoveUnused) don't work with Scala 3 because the compiler doesn't report warnings about unused code.

@joan38
Copy link
Owner

joan38 commented Jun 10, 2021

Ah I see, thanks @olafurpg for the info.
I just created this PR: #47

@joan38
Copy link
Owner

joan38 commented Jun 10, 2021

Released in 0.2.3

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 a pull request may close this issue.

3 participants