Cats: Scalafix rule to help migration to 2.2.0

Created on 12 Aug 2020  路  5Comments  路  Source: typelevel/cats

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.

Most helpful comment

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.

All 5 comments

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...

There was an issue with Future's instances through.

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

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TrustNoOne picture TrustNoOne  路  3Comments

adelbertc picture adelbertc  路  5Comments

tg44 picture tg44  路  4Comments

julien-truffaut picture julien-truffaut  路  3Comments

peterneyens picture peterneyens  路  5Comments