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

Update Scala to 2.13.12 #1374

Closed
wants to merge 1 commit into from
Closed

Update Scala to 2.13.12 #1374

wants to merge 1 commit into from

Conversation

lefou
Copy link
Member

@lefou lefou commented Sep 7, 2023

@lefou
Copy link
Member Author

lefou commented Sep 7, 2023

Looks like Ammonite has issues with changes in the scala-compiler 2.13.12.

$ ./mill -i unitTest "2.13.12"
Compiling /home/runner/work/Ammonite/Ammonite/build.sc
GITHUB REF Some(refs/pull/1374/merge)
...
[366/647] amm.compiler[2.13.12].compile 
[info] compiling 22 Scala sources to /home/runner/work/Ammonite/Ammonite/out/amm/compiler/2.13.12/compile.dest/classes ...
[warn] /home/runner/work/Ammonite/Ammonite/amm/compiler/src/main/scala-2/ammonite/compiler/internal/CustomURLZipArchive.scala:74:18: reference to output is ambiguous;
[warn] it is both defined in the enclosing class CustomURLZipArchive and inherited in the enclosing class File as method output (defined in class VirtualFile, inherited through parent class Entry)
[warn] In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
[warn] Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.output`.
[warn] Or use `-Wconf:msg=legacy-binding:s` to silence this warning. [quickfixable]
[warn]         val os = output
[warn]                  ^
Error:  /home/runner/work/Ammonite/Ammonite/amm/compiler/src/main/scala-2.13.1+/ammonite/compiler/MakeReporter.scala:25:11: `override` modifier required to override concrete member:
Error:  def doReport(pos: scala.reflect.internal.util.Position, msg: String, severity: this.Severity): Unit (defined in class FilteringReporter)
Error:        def doReport(pos: scala.reflect.internal.util.Position,
Error:            ^
[warn] /home/runner/work/Ammonite/Ammonite/amm/compiler/src/main/scala-2/ammonite/compiler/Parsers.scala:57:53: comparing values of types fastparse.ScalaWhitespace.whitespace.type and fastparse.NoWhitespace.noWhitespaceImplicit.type using `ne` will always yield true
[warn]   private def Prelude[_: P] = P( (Annot ~ OneNLMax).rep ~ (Mod ~/ Pass).rep )
[warn]                                                     ^
[warn] /home/runner/work/Ammonite/Ammonite/amm/compiler/src/main/scala-2/ammonite/compiler/Parsers.scala:57:73: comparing values of types fastparse.ScalaWhitespace.whitespace.type and fastparse.NoWhitespace.noWhitespaceImplicit.type using `ne` will always yield true
[warn]   private def Prelude[_: P] = P( (Annot ~ OneNLMax).rep ~ (Mod ~/ Pass).rep )
[warn]                                                                         ^
[warn] /home/runner/work/Ammonite/Ammonite/amm/compiler/src/main/scala-2/ammonite/compiler/Parsers.scala:134:67: comparing values of types fastparse.ScalaWhitespace.whitespace.type and fastparse.NoWhitespace.noWhitespaceImplicit.type using `ne` will always yield true
[warn]   private def Separator[_: P] = P( WL ~ "@" ~~ CharIn(" \n\r").rep(1) )
[warn]                                                                   ^
[warn] four warnings found
Error:  one error found
1 targets failed

@scoquelin
Copy link

scoquelin commented Sep 12, 2023

def doReport(pos: scala.reflect.internal.util.Position,

@lefou
Unless I am missing something, just replacing def doReport by override def doReport as suggested by the compiler should do the trick?

@alexarchambault
Copy link
Collaborator

Just did that in #1375 (sorry I missed that PR)

@alexarchambault alexarchambault deleted the update-scala-2.13.12 branch September 14, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please publish for Scala 2.13.12
3 participants