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

Pipelining prevents Java compilation with compileOrder := JavaThenScala config #7546

Open
guersam opened this issue Apr 19, 2024 · 0 comments
Labels

Comments

@guersam
Copy link

guersam commented Apr 19, 2024

steps

  1. Checkout https://github.com/guersam/sbt-debug-pipelined-hybrid-project.
  2. Run $ sbt run.

problem

It fails due to a missing Java class. The incremental compilation log shows that the Java source code is not compiled.

expectation

It prints:

Hello world!
42

notes

  1. Both usePipelining := true and compileOrder := CompilerOrder.JavaThenScala settings are needed to reproduce
  2. It's reproducible both in sbt 1.9.9 and 1.10.0-RC2.
  3. It happens with both Scala 2 and 3.
  4. CI result with sbt 'last compileIncremental' log
[info] welcome to sbt 1.10.0-RC2 (Eclipse Adoptium Java 11.0.22)
[info] loading project definition from /home/runner/work/sbt-debug-pipelined-hybrid-project/sbt-debug-pipelined-hybrid-project/project
[info] loading settings for project root from build.sbt ...
[info] set current project to sbt-pipelining-debug (in build file:/home/runner/work/sbt-debug-pipelined-hybrid-project/sbt-debug-pipelined-hybrid-project/)
[debug] [zinc] IncrementalCompile -----------
[debug] IncrementalCompile.incrementalCompile
[debug] previous = Stamps for: 0 products, 0 sources, 0 libraries
[debug] current source = Set(${BASE}/src/main/java/example/JavaClass.java, ${BASE}/src/main/scala/example/Main.scala)
[debug] > initialChanges = InitialChanges(Changes(added = Set(${BASE}/src/main/java/example/JavaClass.java, ${BASE}/src/main/scala/example/Main.scala), removed = Set(), changed = Set(), unmodified = ...),Set(),Set(),API Changes: Set())
[debug] Full compilation, no sources in previous analysis.
[debug] all 2 sources are invalidated
[debug] Initial set of included nodes: 
[debug] Recompiling all sources: number of invalidated sources > 50.0 percent of all sources
[debug] compilation cycle 1
[info] compiling 1 Scala source and 1 Java source to /home/runner/work/sbt-debug-pipelined-hybrid-project/sbt-debug-pipelined-hybrid-project/target/scala-3.4.1/classes ...
[debug] Returning already retrieved and compiled bridge: /home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-sbt-bridge/3.4.1/scala3-sbt-bridge-3.4.1.jar.
[debug] [zinc] Running cached compiler 5[9](https://github.com/guersam/sbt-debug-pipelined-hybrid-project/actions/runs/8747771673/job/24006749488#step:5:10)c3d61b for Scala Compiler version 3.4.1
[debug] [zinc] The Scala compiler is invoked with:
[debug] 	-classpath
[debug] 	/home/runner/work/sbt-debug-pipelined-hybrid-project/sbt-debug-pipelined-hybrid-project/target/scala-3.4.1/classes:/home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.4.1/scala3-library_3-3.4.1.jar:/home/runner/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.[12](https://github.com/guersam/sbt-debug-pipelined-hybrid-project/actions/runs/8747771673/job/24006749488#step:5:13)/scala-library-2.13.12.jar
[debug] Compilation failed
[error] (Compile / compileIncremental) Compilation failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant