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

Scala 2.13.2 bridge builds with warnings #11952

Closed
soronpo opened this issue Apr 23, 2020 · 2 comments · Fixed by scala/scala#8923
Closed

Scala 2.13.2 bridge builds with warnings #11952

soronpo opened this issue Apr 23, 2020 · 2 comments · Fixed by scala/scala#8923
Assignees
Labels
Milestone

Comments

@soronpo
Copy link

soronpo commented Apr 23, 2020

reproduction steps

Any fresh build of a project with 2.13.2.

problem

I get

[info] Non-compiled module 'compiler-bridge_2.13' for Scala 2.13.2. Compiling...
9 warnings

It's only occurring at the first bridge build

expectation

No warnings displayed

@soronpo soronpo changed the title Scala 2.13.2 bridge builds with warning Scala 2.13.2 bridge builds with warnings Apr 23, 2020
@SethTisue SethTisue added this to the 2.13.3 milestone Apr 23, 2020
@smarter
Copy link
Member

smarter commented Apr 23, 2020

The bridge is built with -nowarn: https://github.com/sbt/zinc/blob/2f1bad9874d9a4fdca7e17f071ae1943ec45521e/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/AnalyzingCompiler.scala#L376. @lrytz Did scala/scala#8373 change the behavior of -nowarn? Is there another flag that should be used by zinc, or should zinc filter the compiler output manually?

@lrytz
Copy link
Member

lrytz commented Apr 23, 2020

Not that I'm aware. The regression seems to be in 2.13.1:

$> cat Test.scala
class C {
  def f = 1 → 2
  def g: Unit = 1
}
$> scv 2.13.0 Test.scala
Test.scala:3: warning: a pure expression does nothing in statement position
  def g: Unit = 1
                ^
warning: there was one deprecation warning (since 2.13.0); re-run with -deprecation for details
two warnings found
$> scv 2.13.0 Test.scala -nowarn
$> scv 2.13.1 Test.scala -nowarn
two warnings found
$> scv 2.13.2 Test.scala -nowarn
2 warnings
$>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants