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

scalafix: leverage scalafixEnable & scalafixAll #550

Merged
merged 1 commit into from
Jul 29, 2022
Merged

Conversation

bjaglin
Copy link
Contributor

@bjaglin bjaglin commented Jul 15, 2022

The scalafixEnable command is used by scala-steward for more than 3 years and got some further improvements lately, so I think it's safe to rely on it instead of asking users to update their build.

@bjaglin bjaglin force-pushed the docs branch 3 times, most recently from 1198757 to 3f754f6 Compare July 15, 2022 15:02
README.md Outdated

```scala
// project/plugins.sbt
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

let's hold the merge of that doc, as invalid code may be generated when scalafix 0.10.x runs a version of the migration prior to #549

@bjaglin bjaglin marked this pull request as ready for review July 15, 2022 15:10
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "<version>"
addCompilerPlugin(scalafixSemanticdb)
scalacOptions ++= List("-Yrangepos", "-P:semanticdb:synthetics:on")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, synthetics are used in the rule, so we'll need to keep that :(

@SethTisue
Copy link
Member

you're saying we should roll a release, then merge this? do I understand correctly?

@bjaglin
Copy link
Contributor Author

bjaglin commented Jul 27, 2022

you're saying we should roll a release, then merge this? do I understand correctly?

Yes because the commands advertised in the docs are relevant for scalafix 0.10.x, and running the rule in 2.8.0 with scalafix 0.10.x would generate invalid code, as identified/fixed in #549.

I rebased against #549.

@SethTisue SethTisue mentioned this pull request Jul 27, 2022
@SethTisue
Copy link
Member

okay; release ticket #552

@SethTisue SethTisue self-assigned this Jul 27, 2022
@SethTisue SethTisue merged commit 4629e6c into scala:main Jul 29, 2022
@SethTisue
Copy link
Member

thanks @bjaglin !

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

2 participants