-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Mixed compilation with .java
sources causes cyclic inheritance error
#21533
Comments
@tgodzik any clue? I suppose we have to consider this a regression, since |
Is this reproducible with straight scala-cli? |
Yep. Tested on |
Interesting... I just tested with SBT and I'm getting the same error. sbt compile
# [info] welcome to sbt 1.10.1 (Eclipse Adoptium Java 17)
# [info] loading global plugins from /Users/pchabelski/.sbt/1.0/plugins
# [info] loading project definition from /Users/pchabelski/IdeaProjects/scala-cli-tests-2/untitled/mixed-compilation-repro/dest/project
# [info] loading settings for project dest from build.sbt ...
# [info] set current project to dest (in build file:/Users/pchabelski/IdeaProjects/scala-cli-tests-2/untitled/mixed-compilation-repro/dest/)
# [info] Executing in batch mode. For better performance use sbt's shell
# [info] compiling 1 Scala source and 1 Java source to /Users/pchabelski/IdeaProjects/scala-cli-tests-2/untitled/mixed-compilation-repro/dest/target/scala-3.5.0/classes ...
# [error] /Users/pchabelski/IdeaProjects/scala-cli-tests-2/untitled/mixed-compilation-repro/dest/src/main/java/Reporters.java:4:33: cyclic inheritance involving ConsoleReporter
# [error] ConsoleReporter
# [error] ^
# [error] (Compile / compileIncremental) javac returned non-zero exit code
# [error] Total time: 2 s, completed Sep 4, 2024, 12:23:27 PM Apparently the same also happens with Bazel... (cc @WojciechMazur) I'm no longer convinced this is to be treated as a regression, we seem to have had this bug for a while... 😕 |
From what I see server=false doesn't compile Java files:
Edit: I have some additional files here, but there are not compiled java files |
.java
sources causes cyclic inheritance error
This is not related to the runner. Since this happens in Bazel as well, I don't think it's Bloop-related. |
Compiler version
All Scala versions (both Scala 3 and Scala 2)
Minimized code
Important: Compiles correctly when build server is not used (
scala --server=false
), otherwise compilation of java source yields cyclic inheritance errorOutput
Expectation
Should compile also when build server is used
The text was updated successfully, but these errors were encountered: