-
Notifications
You must be signed in to change notification settings - Fork 188
build and test against scala 3.7.0 #2211
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
Conversation
4a96a16
to
ceb4e25
Compare
On Scala 2.13.15+, canonical patterns (vars with the same names as the | ||
attributes) do not trigger unused warnings, so the input above will not | ||
be rewritten. See https://github.com/scala/bug/issues/13035. |
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.
since this is now the default behavior on latest 2.13.x and 3.x, I am removing the "exception" note and documenting it via an example, as it can be surprising
325a956
to
66ea916
Compare
...afix-tests/input/src/main/scala-3next/test/explicitResultTypes/ExplicitResultTypesBase.scala
Outdated
Show resolved
Hide resolved
93d36c3
to
3a6216e
Compare
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.
Copilot reviewed 12 out of 30 changed files in this pull request and generated no comments.
Files not reviewed (18)
- project/Dependencies.scala: Language not supported
- project/Mima.scala: Language not supported
- project/ScalafixBuild.scala: Language not supported
- scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala: Language not supported
- scalafix-rules/src/main/scala/scalafix/internal/rule/RemoveUnused.scala: Language not supported
- scalafix-rules/src/main/scala/scalafix/internal/rule/RemoveUnusedConfig.scala: Language not supported
- scalafix-tests/expect/src/test/scala/scalafix/tests/rule/RuleSuite.scala: Language not supported
- scalafix-tests/input/src/main/scala-2/test/explicitResultTypes/ExplicitResultTypesBase.scala: Language not supported
- scalafix-tests/input/src/main/scala-2/test/explicitResultTypes/ExplicitResultTypesImplicit.scala: Language not supported
- scalafix-tests/input/src/main/scala-2/test/removeUnused/RemoveUnusedParams.scala: Language not supported
- scalafix-tests/input/src/main/scala-2/test/removeUnused/RemoveUnusedPatternVars.scala: Language not supported
- scalafix-tests/input/src/main/scala-3lts/test/removeUnused/RemoveUnusedPatternVars.scala: Language not supported
- scalafix-tests/input/src/main/scala-3next/test/explicitResultTypes/ExplicitResultTypesBase.scala: Language not supported
- scalafix-tests/input/src/main/scala-3next/test/removeUnused/RemoveUnusedParams.scala: Language not supported
- scalafix-tests/input/src/main/scala-3next/test/removeUnused/RemoveUnusedPatternVars.scala: Language not supported
- scalafix-tests/integration/src/test/scala/scalafix/tests/interfaces/ScalafixSuite.scala: Language not supported
- scalafix-tests/output/src/main/scala-2.12/test/removeUnused/RemoveUnusedPatternVars.scala: Language not supported
- scalafix-tests/output/src/main/scala-2.13/test/removeUnused/RemoveUnusedPatternVars.scala: Language not supported
Comments suppressed due to low confidence (3)
scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java:163
- Ensure there are tests covering the new '3.7' branch to validate that the expected version is correctly handled.
else if (requestedScalaMajorMinorOrMajorVersion.equals("3.7")) {
docs/rules/RemoveUnused.md:75
- [nitpick] Consider using canonical pattern variable names consistent with other examples, unless the change is intentional to demonstrate a different naming style.
case AB(foo, bar) => println("Not used")
docs/rules/RemoveUnused.md:93
- The phrasing 'until Scala 3.7.0' could be ambiguous; consider rephrasing to 'only available starting with Scala 3.7.0' for better clarity.
On Scala 3, an additional `-Wunused:unsafe-warn-patvars` option is required until Scala 3.7.0.
val ff = (_: String) => println("f") | ||
val fs = (used: String, _: Long) => println(used) | ||
def g(x: String => Unit): Unit = ??? | ||
g{implicit string => println("g")} |
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.
there is no diagnostic for this on the semanticdb emitted by scala 3.7.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.
Looks like a regression from the huge PR about unused settings. I think this might not only be semanticdb.
72b4f71
to
1cff039
Compare
- document deprecation of `-Wunused:unsafe-warn-patvars` - document fragmented canonical patvars behavior
https://www.scala-lang.org/news/3.7.0/
ExplicitResultTypes
breaks compilation when using symbolic methods #2166 via Fix inferredTypeEdits for symbols scala/scala3#22485