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

Update sbt-scalafix to 0.9.5 #2907

Merged
merged 2 commits into from
Jun 25, 2019
Merged

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Jun 22, 2019

This updates Scalafix to 0.6.0-M9 by applying this diff. I've checked locally that the Scalafix tests still pass.

My ultimate goal is to update Scalafix to 0.9.x so that this rule (and potential future rules) can be used by Scala Steward (scala-steward-org/scala-steward#611) but it is currently unclear to me if updating to 0.9.x means that this rule needs to rewritten with Scalafix' v1 API. @olafurpg do v0 rules also work with 0.9.x?

@olafurpg
Copy link
Contributor

In Scalafix v0.9 there is a import scalafix.v0._ that keeps the old API and should at least make old rules compile with the latest Scalafix. However, all symbol matchers like

_root_.cats.syntax.CartesianOps.`*>`.

will need to be written against the new symbol format

cats/syntax/CartesianOps#`*>`(). (assuming *> is a method and CartesianOps is a class)

@olafurpg
Copy link
Contributor

Scalafix 0.6.x only supports outdated Scala versions so it's not much value today. The 0.9.x API will probably stay stable for a long time, it should probably be released as v1.0.

@codecov-io
Copy link

codecov-io commented Jun 22, 2019

Codecov Report

Merging #2907 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2907   +/-   ##
=======================================
  Coverage   94.26%   94.26%           
=======================================
  Files         363      363           
  Lines        6945     6945           
  Branches      181      181           
=======================================
  Hits         6547     6547           
  Misses        398      398

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae67418...81cd25c. Read the comment docs.

@fthomas
Copy link
Member Author

fthomas commented Jun 22, 2019

Rewriting the symbol matchers did the trick. Thanks, @olafurpg!

sbt-scalafix is now on 0.9.5.

@fthomas fthomas changed the title Update sbt-scalafix to 0.6.0-M9 Update sbt-scalafix to 0.9.5 Jun 22, 2019
@fthomas
Copy link
Member Author

fthomas commented Jun 22, 2019

And it works for Scala Steward: https://github.com/fthomas/scalafix-test/pull/9/files :-)

Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

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

Thanks very much!

@fthomas fthomas merged commit 162ee0f into typelevel:master Jun 25, 2019
@fthomas fthomas deleted the update/scalafix branch June 25, 2019 19:28
@kailuowang kailuowang added this to the 2.0.0-RC1 milestone Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants