-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Automate migration to 1.0 with Scalafix #1791
Comments
Love the idea. It also makes it easier for people to start contribute to #1762 |
#1793 is now merged! There are still a lot of low-hanging fruits, but in the meantime it would be great if anyone could try running the rewrites in repos using cats and report feedbacks here. Instructions here https://github.com/typelevel/cats/blob/master/scalafix/README.md |
Thanks so much again. I am waiting on this PR #1806 before updating the release note. Then I am thinking we should broadcasting it on twitter, do you mind if I mention your twitter handler? |
happy to finally contribute back! :) I tweeted it out myself, but I guess some more noise won't hurt ;) |
I've just tried this migration and I get a weird import fix:
|
This was mostly resolved by #1793, and at this point Cats 1.0 has been out long enough that I doubt anyone is only now upgrading to it. I'm going to go ahead and close this out. |
Now that the 1.0 is close, I got a chance to take a look at the breaking changes it introduces and I noticed that the vast majority of them are well within the possibilities of Scalafix.
So, well, why not just automate the migration away?
I started experimenting on it and it's promising! So far I got:
Unapply
machinery (just a bunch of symbol renames, but, hey, I wanted to start easy)CartesianBuilder
syntax (this is trickier, but the rewrite is still around 50 lines of code)Would you be interested in this?
If so, I think it would be really cool to ship the rewrites with the final release of 1.0.0 so that anyone can access them easily simply by having cats as a dependency. I'll push my work in progress soon, but in the meantime here's some diff I was able to fully automate:
A couple of more things to notice:
map
we're looking for_root_.cats.syntax.CartesianBuilder#CartesianBuilder2.map.
, not just anymap
)The text was updated successfully, but these errors were encountered: