-
Notifications
You must be signed in to change notification settings - Fork 9
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
Test Scala 3 input/output with rule built against Scala 2.12 #19
Conversation
3ce2acf
to
d1ed075
Compare
Moving back to draft while upstreaming changed made here to scalacenter/sbt-scalafix#219 |
I don't completely get why we have multiple rules modules. I think it can lead to thinking that to use write a scala 3 rule, you need to do it under rules_3 that doesn't exist. |
That materializes what gets cross-built, it's common when moving from
I went through several iterations to avoid that impression, and I thought the |
I would like to have @adpi2 advice/review (if you can). |
0e1b38c
to
c5b4eb6
Compare
@@ -1,11 +1,15 @@ | |||
lazy val V = _root_.scalafix.sbt.BuildInfo | |||
|
|||
lazy val rulesCrossVersions = Seq(V.scala213, V.scala212, V.scala211) | |||
lazy val scala3Version = "3.0.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.
As 3.x releases come out, we might want to test against different versions (although upgrading scala should not be as hard as on the 2.x era obviously). When/if that happens, we should use the full scala version as matrix suffixes, but I don't see a reason to do it now.
ead864d
to
d9f27cc
Compare
Move to sbt-projectmatrix so that `sbt tests/test` checks * Scala 2.x input/output with Scala 2.x rule and * Scala 3 input/output with Scala 2.12 rule
As it only works with Scala 2.x, the few rule authors relying on it would have to disable Scala 3 testing which is on by default, so we'd better make it an opt-in rather than an opt-out.
Still stale result from solr, so I ended up adding ee98b06 to unblock this for the release. |
- it was written 4 years ago as a "migration guide" to track and encourage the cross-building effort, which is now complete for all major rules - it does not cover Scala 3 at all, for which sbt-projectmatrix was introduced in scalafix.g8 via scalacenter/scalafix.g8#19
This is moving the template from the built-in mutable/sequential
crossScalaVersions
way to the immutable/parallel sbt-projectmatrix one, to try to make it clearer that we test 3.x, but we don't cross-publish. For the record, here is the initial attempt without sbt-projectmatrix: 3ce2acf#diff-8b4a41b53e6e5f25138da6b4dc5f2d34051e59204e43fa2e9714a275997cf5e0 which mostly worked but was very hacky and hard to understand IMHO.I verified that
sbt ~tests/test
is working+publishLocal
publishes 3 artifacts