-
Notifications
You must be signed in to change notification settings - Fork 18
specify ExplicitNonNullaryApply supported scala version in README #34
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
Merged
dwijnand
merged 2 commits into
lightbend-labs:master
from
taisukeoe:add-scala-version-caution
Jun 30, 2020
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| # CAUTIONS! | ||
| Current released Scalafix supports ExplicitNonNullaryApply [ONLY in Scala 2.12](https://github.com/scala/scala-rewrites/issues/31). | ||
| Scalafix will support 2.13 and 2.11 with cross-building ExplicitNonNullaryApply rule against them. | ||
|
|
||
| # Scalafix Rewrites for Scala | ||
|
|
||
| ## To develop the rule | ||
|
|
@@ -10,8 +14,9 @@ sbt ~tests/test | |
| ## To run the rule | ||
|
|
||
| 0. Publish the rule: `publishLocal` | ||
| 1. Add sbt-scalafix: `addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.5")` | ||
| 1. Add sbt-scalafix: `addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.17")` | ||
| 2. Add SemanticDB: `addCompilerPlugin(scalafixSemanticdb)` | ||
| 3. Configure Semantic DB: `scalacOptions ++= List("-Yrangepos", "-P:semanticdb:synthetics:on")` | ||
| 4. Run the rule: `scalafix dependency:Scala213@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT` | ||
| 5. Run the rule on test sources: `Test/scalafix dependency:Scala213@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT` | ||
|
Contributor
Author
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. Scala213 rule has been renamed and no longer exists. |
||
| 4. Run a rule you want: `scalafix dependency:RULE_NAME@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT` | ||
| - For example, you can run Varargs rule by: `scalafix dependency:fix.scala213.Varargs@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT` | ||
| 5. Run the rule on test sources: `Test/scalafix dependency:RULE_NAME@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.15") | ||
| addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.17") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 someone who doesn't quite understand the mechanics of these libraries properly, allow me to attempt to clarify.
"Scalafix v1 will allow the ExplicitNonNullaryApply rule to work and fix up code in Scala 2.11 and 2.13"
Is that correct?
Uh oh!
There was an error while loading. Please reload this page.
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.
Thank you for clarification.
It looks good to me except Scalafix version, depending on Scalafix release plans.
I'm not sure it will be effective only after Scalafix v1, since the PullRequest has been already merged and there might be additional v0.9.X releases.
So I'm fine with rewriting the sentence with:
"Scalafix will allow the ExplicitNonNullaryApply rule to work and fix up code in Scala 2.13"
(Considering the nature of the rule, 2.11 can be omitted)
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.
Of note, even coming Scalafix releases, ExplicitNonNullaryApply rule has to be cross-built by #31 PR.
Uh oh!
There was an error while loading. Please reload this page.
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.
although it won't be automatic, the upcoming 0.9.18 release of sbt-scalafix (probably out tomorrow) will support running rules compiled in 2.11 and 2.13, see scalacenter/scalafix#1166 for needed steps (feedback welcome there too!)