-
Notifications
You must be signed in to change notification settings - Fork 502
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 Scalafix migration for Cats 2.2.0 #1594
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1594 +/- ##
=======================================
Coverage 70.28% 70.28%
=======================================
Files 113 113
Lines 1780 1780
Branches 48 48
=======================================
Hits 1251 1251
Misses 529 529 Continue to review full report at Codecov.
|
@@ -60,8 +60,8 @@ migrations = [ | |||
groupId: "org.typelevel", | |||
artifactIds: ["cats-core"], | |||
newVersion: "2.2.0-RC4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be updated to "2.2.0"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current value for newVersion
would trigger the execution of the migration whenever the new version is bigger than 2.2.0-RC4
.As tried out by @fthomas this would bump users from 2.2.0-RC3
to 2.2.0-RC4
using the migration.
Projects on 2.1.1
would get upgraded to 2.2.0
using the migration once it is available without further action required. And if there would happen a 2.2.0-RC5
before users already on 2.2.0-RC4
wouldn't get the migration 2nd time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mzuehlke is correct. - The only downside of not updating newVersion
is that projects, that were already on 2.2.0-RC4
before the migration was added here, won't get the migration with the bump to 2.2.0
.
Since it seems that I'm the only one who tested the migration with the public Scala Steward instance so far (see https://github.com/search?q=author%3Ascala-steward+is%3Apr+cats+2.2.0-RC4+Applied+Migrations) it might make sense to bump newVersion
to 2.2.0
nonetheless. I don't mind if Scala Steward applies the migration a 2nd time on my projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.2.0 will probably be released today (https://gitter.im/typelevel/cats-dev?at=5f50d85d59ac794e02e56b5b) so I think it makes sense to bump newVersion
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumped in #1596.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
PRs with this Scalafix migration can be found here: https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+github:typelevel/cats/Cats_v2_2_0 |
I see a few weird PRs where scala-steward appears to be updating the wrong dependency, e.g. https://github.com/evolution-gaming/sharding-strategy/pull/48/files and https://github.com/evolution-gaming/kafka-flow/pull/68/files. Is this a known issue? Here it's not updating any dependencies at all, but it runs the scalafix rule: https://github.com/evolution-gaming/pubsub/pull/66/files Regarding the rule itself, unfortunately it looks like there are still a couple of cases we missed in our testing. e.g. chenharryhua/nanjin#712 doesn't appear to have CI set up, but I cloned it and tried compiling the PR. There are a few compilation errors of the form:
That's a shame, but hopefully the rule is still useful for the majority of people. |
Yes, that is tracked in #1184.
That can happen too. Normally Scala Steward just does not open a PR if it can't find the version number to update. But if a Scalafix migration causes changes it creates a PR anyway. Maybe it shouldn't do that.
The majority of PRs have now been merged as-is, so I consider this a success. |
See #1588