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 rule to help migration to 2.2.0 #3563

Closed
cb372 opened this issue Aug 12, 2020 · 5 comments · Fixed by #3566
Closed

Scalafix rule to help migration to 2.2.0 #3563

cb372 opened this issue Aug 12, 2020 · 5 comments · Fixed by #3566

Comments

@cb372
Copy link
Contributor

cb372 commented Aug 12, 2020

I'm really looking forward to upgrading to 2.2.0 and deleting all my cats.instances.* imports!

Is it worth providing an official scalafix rule to help people do this?

It could be just a simple grep to delete all import cats.instances.* lines, or it could be a bit smarter and also delete import cats.implicits._ lines that are only being used to import instances, not syntax.

@cb372
Copy link
Contributor Author

cb372 commented Aug 12, 2020

Started work on a rule here: https://github.com/cb372/cats/tree/scalafix-rules-2.2.0

Now I just need to draw the rest of the owl...

@joroKr21
Copy link
Member

There was an issue with Future's instances through.

@cb372
Copy link
Contributor Author

cb372 commented Aug 13, 2020

Yes, I saw the discussion about that. I think it should be pretty simple to make the rule do special handling for Future instances.

@fthomas
Copy link
Member

fthomas commented Aug 13, 2020

It would be great to add this migration rule to Scala Steward so that it can be used for the PRs that update Cats to 2.2.0.

@cb372
Copy link
Contributor Author

cb372 commented Aug 13, 2020

Sure! If my PR gets merged, I'll make a PR to add it to Scala Steward.

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