scoverage / sbt-scoverage

sbt plugin for scoverage
Apache License 2.0
649 stars 156 forks source link

NoDenotation error with scala 3.3.0 #511

Open frozenwizard opened 1 year ago

frozenwizard commented 1 year ago

I have a project that was running fine under 3.2.1 with coverage. I upgraded to scala 3.3.0 and also sbt-tpolecat and scoverage to the latest versions. Now when I run coverage on tests and integration tests they fail during compilation with an error I don't understand.


java.lang.AssertionError: NoDenotation.owner while running MegaPhase{crossVersionChecks, protectedAccessors, extmethods, uncacheGivenAliases, elimByName, hoistSuperArgs, forwardDepChecks, specializeApplyMethods, tryCatchPatterns, patternMatcher} on /builds/Myfile.scala
[info] exception occurred while compiling /builds/<my project files here>
java.lang.AssertionError: NoDenotation.owner while compiling <insert my scala files here>
[error] ## Exception when compiling 13 sources to /builds/my-project/target/scala-3.3.0/classes
[error] java.lang.AssertionError: NoDenotation.owner
[error] dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2576)
[error] dotty.tools.dotc.transform.HoistSuperArgs$Hoister.hoistSuperArgsFromCall(HoistSuperArgs.scala:185)

When running test/itests on their own there is no issue, only when I add in the coverage to "sbt coverage test" does it fail. This error seems to be a compiler error?

ckipp01 commented 1 year ago

Hey @frozenwizard, do you have a code sample that we can reproduce this with?

frozenwizard commented 1 year ago

I can possibly work one out in a few days.

ckipp01 commented 1 year ago

I can possibly work one out in a few days.

Perfect, thanks. That way we can verify where the issue actually is and probably report it upstream since it looks to be stemming from there.

joca0612 commented 11 months ago

I encountered the same error. Do you have any guidance on how I can figure out the source of the issue to reproduce it? My project is really large and the stacktrace does not help (it is similar to the original poster). I tried running coverage using -Ycheck:all but still no clue. For reference, it seems like this was considered solved on the lang side