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

Use Simulacrum Scalafix #3424

Merged

Conversation

travisbrown
Copy link
Contributor

@travisbrown travisbrown commented May 22, 2020

Addresses #3192, using a new release of Simulacrum Scalafix. An earlier version of this change was included in #3269, but I think it should be reviewed and merged separately from the Dotty cross-build work (we'll need to decide which Dotty version to support, since for example there's still no official 0.23 or 0.24 release of the scalatestplus dependency, but I don't think that should block this change).

The Scalafix commit was generated by running the following commands:

sbt:cats> scalafix AddSerializable
sbt:cats> scalafix AddImplicitNotFound
sbt:cats> scalafix TypeClassSupport
sbt:cats> scalafmtAll

These commands will need to be run manually after any API change that needs syntax support. I haven't added this process to the validateJVM task yet, but they're idempotent and only take a few seconds, so I guess we could run them on every build.

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2020

Codecov Report

Merging #3424 into master will decrease coverage by 1.11%.
The diff coverage is 50.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3424      +/-   ##
==========================================
- Coverage   92.65%   91.54%   -1.12%     
==========================================
  Files         379      379              
  Lines        7994     8209     +215     
  Branches      227      227              
==========================================
+ Hits         7407     7515     +108     
- Misses        587      694     +107     
Flag Coverage Δ
#scala_version_212 91.53% <50.18%> (-1.15%) ⬇️
#scala_version_213 91.33% <50.18%> (-1.09%) ⬇️
Impacted Files Coverage Δ
...lleycats-core/src/main/scala/alleycats/ConsK.scala 0.00% <0.00%> (ø)
...lleycats-core/src/main/scala/alleycats/Empty.scala 0.00% <0.00%> (ø)
...leycats-core/src/main/scala/alleycats/EmptyK.scala 0.00% <0.00%> (ø)
...eycats-core/src/main/scala/alleycats/Extract.scala 0.00% <0.00%> (ø)
alleycats-core/src/main/scala/alleycats/One.scala 0.00% <0.00%> (ø)
alleycats-core/src/main/scala/alleycats/Pure.scala 0.00% <0.00%> (ø)
alleycats-core/src/main/scala/alleycats/Zero.scala 0.00% <0.00%> (ø)
core/src/main/scala/cats/Alternative.scala 70.58% <0.00%> (-21.72%) ⬇️
core/src/main/scala/cats/Applicative.scala 90.47% <0.00%> (-4.53%) ⬇️
core/src/main/scala/cats/Bifoldable.scala 68.42% <0.00%> (-24.44%) ⬇️
... and 40 more

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 e5fed5a...e657272. Read the comment docs.

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

I'm usually against checked in generated source, but I feel better after rereading the linked ticket. I think this is our best option at present. 👍

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.

I like this approach.

haven't added this process to the validateJVM task yet,

Just curious, so the plan is to have validateJVM generate code and add commits to PRs from CI?

@travisbrown
Copy link
Contributor Author

@kailuowang I think API changes that map over to codegen changes will be infrequent enough that we can run it manually for now. If it turns out that that's not the case and we're getting a lot of PRs with missing codegen changes, we could tie these tasks into validateJVM or prePR, so that they'd be run when people build locally.

I guess we could also have something more automated in CI, but that seems unnecessary for something that's likely to happen once every month or two.

@travisbrown
Copy link
Contributor Author

Thanks all! I'm merging this with a merge commit to keep the automated changes separate from the configuration that sets them up. I'll update the Dotty cross-building branch later today or tomorrow.

@travisbrown travisbrown merged commit e7509a1 into typelevel:master May 24, 2020
@travisbrown travisbrown deleted the topic/simulacrum-scalafix-0.2.0 branch May 24, 2020 09:01
@travisbrown travisbrown added this to the 2.2.0-M2 milestone May 24, 2020
@satorg satorg mentioned this pull request Mar 8, 2022
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