-
Notifications
You must be signed in to change notification settings - Fork 43
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
Scala 2.13.6 & -Xsource:3 support #221
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,14 @@ lazy val rules = projectMatrix | |
|
||
lazy val input = projectMatrix | ||
.defaultAxes(VirtualAxis.jvm) | ||
.jvmPlatform(scalaVersions = Seq(scala3Version)) | ||
.jvmPlatform( | ||
scalaVersions = rulesCrossVersions, | ||
scalaVersions = Seq(V.scala213), | ||
settings = Seq( | ||
scalacOptions += "-P:semanticdb:synthetics:on" | ||
scalacOptions += "-Xsource:3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this shows how nice sbt-projectmatrix can be! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. The only thing I am worried about, is if we are the only project that use it. It introduces some new syntax to understand/learn, especially that sbt is usually not something that people master correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The rule authors shouldn't have to touch anything in projects bootstrapped by scalacenter/scalafix.g8#19 unless they need to disable scala3 testing (which I enabled on purpose). Maybe that's something to discuss on the PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or maybe they want to write only for scala 3. I think it should be easy to remove axes that the authors don't want? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's discuss this on the PR. |
||
) | ||
) | ||
.jvmPlatform(scalaVersions = Seq(scala3Version)) | ||
.jvmPlatform(scalaVersions = Seq(V.scala212, V.scala211)) | ||
|
||
lazy val output = projectMatrix | ||
.defaultAxes(VirtualAxis.jvm) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
rules = [ SemanticRule ] | ||
*/ | ||
package fix | ||
|
||
open class Source3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package fix | ||
|
||
open class Source3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
-> tests/test | ||
> testsTarget3/test:run --save-expect | ||
> testsTarget2_13/test:run --save-expect | ||
> tests/test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rules = [ | ||
LeakingImplicitClassVal # check that scalacOptions are passed for syntactic rules | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
open class Source3 | ||
|
||
object Source3 { | ||
implicit class XtensionVal(val str: String) extends AnyVal { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just amended the last commit yo move this inside an object to avoid
|
||
def doubled: String = str + str | ||
} | ||
} |
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.
force-pushed: this was not used!