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

3.3.0-RC4 -Wunused:all compiler exception #17309

Closed
ornicar opened this issue Apr 19, 2023 · 4 comments · Fixed by #17316
Closed

3.3.0-RC4 -Wunused:all compiler exception #17309

ornicar opened this issue Apr 19, 2023 · 4 comments · Fixed by #17316
Assignees
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug itype:crash regression This worked in a previous version but doesn't anymore stat:needs minimization Needs a self contained minimization
Milestone

Comments

@ornicar
Copy link

ornicar commented Apr 19, 2023

When compiling lila with:

  • scala 3.3.0-RC4
  • -Wunused:all flag
  • openjdk version "17.0.6" 2023-01-17
  • sbt 1.8.2

we get the following exception:

java.lang.AssertionError: NoDenotation.owner while running checkUnusedPostInlining on lila/modules/tree/src/main/Eval.scala
[info] exception occurred while compiling lila/modules/tree/src/main/Eval.scala, lila/modules/tree/src/main/package.scala, lila/modules/tree/src/main/tree.scala
java.lang.AssertionError: NoDenotation.owner while compiling lila/modules/tree/src/main/Eval.scala, lila/modules/tree/src/main/package.scala, lila/modules/tree/src/main/tree.scala
[error] ## Exception when compiling 3 sources to lila/modules/tree/target/scala-3.3.0-RC4/classes
[error] java.lang.AssertionError: NoDenotation.owner

Here's the full compiler output.

It works if we remove the -Wunused:all flag from the build settings, or if we downgrade scala to 3.3.0-RC3.

How to reproduce:

git clone https://github.com/lichess-org/lila.git --branch scala-3.3.0-RC4
cd lila
sbt compile
@ornicar ornicar added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 19, 2023
@ornicar
Copy link
Author

ornicar commented Apr 19, 2023

It can also be reproduced with lila-ws, a much smaller project.

git clone https://github.com/lichess-org/lila-ws.git --branch Wunused-all
cd lila-ws
sbt compile

@jchyb jchyb added stat:needs minimization Needs a self contained minimization regression This worked in a previous version but doesn't anymore area:linting Linting warnings enabled with -W or -Xlint and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 19, 2023
@Kordyjan Kordyjan added this to the 3.3.0 backports milestone Apr 19, 2023
KacperFKorban referenced this issue in dotty-staging/dotty Apr 19, 2023
@WojciechMazur
Copy link
Contributor

Also present in 3 Open CB projects:

Project Version Build URL Notes
cchantep/acolyte 1.2.6 Open CB logs Contains other compilation errors (scaladoc)
reactivemongo/reactivemongo-bson 1.1.0-RC9 Open CB logs
reactivemongo/reactivemongo-play-json 1.1.0-play29-RC9 Open CB logs

@KacperFKorban
Copy link
Member

The common factor is reactivemongo-bson-api.
Partial minimization with just reactivemongo-bson-api as dependency:

//> using scala "3.3.0-RC4-bin-SNAPSHOT"
//> using options "-Wunused:all"
//> using lib "org.reactivemongo::reactivemongo-bson-api:1.1.0-RC9"

import reactivemongo.api.bson.*

case class Eval()

given BSONDocumentHandler[Eval] = Macros.handler

@Kordyjan
Copy link
Contributor

We have identified the symbol that is missing a denotation, and this is definitely some weird bug. It shouldn't cause further problems but still, we need to investigate it.

The investigation will take place under #17346. In the meantime, #17316 fixed the symptoms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug itype:crash regression This worked in a previous version but doesn't anymore stat:needs minimization Needs a self contained minimization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants