zinc
zinc copied to clipboard
Compiling never stops
I'm using mill to build using
> mill reds.compile
In order to isolate the problem to zinc I modified the run task to call:
val r = zincWorker.worker().compileMixed(
upstreamCompileOutput(),
files,
compileClasspath().map(_.path),
javacOptions(),
scalaVersion(),
scalaOrganization(),
scalacOptions(),
scalaCompilerClasspath().map(_.path),
scalacPluginClasspath().map(_.path),
T.reporter.apply(hashCode)
)
println("############################## DONE COMPILING ##############################")
It never reaches the println.
The compiler output that results is something like:
[info] compiling 40 Scala sources and 132 Java sources to /Users/tballard/vs_repo/redspro/out/reds/compile.dest/classes ...
[warn] 1 deprecation
[warn] 6 deprecations (since 2.13.0)
[warn] 3 deprecations (since 2.13.3)
[warn] 2 deprecations (since 2.13.7)
[warn] 12 deprecations in total; re-run with -deprecation for details
[warn] 3 feature warnings; re-run with -feature for details
[warn] 6 warnings found
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/web/modules/taglibs/jobs/Member.java: Some input files use or override a deprecated API.
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/web/modules/taglibs/jobs/Member.java: Recompile with -Xlint:deprecation for details.
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/biz/CRaGLoader.java: Some input files use unchecked or unsafe operations.
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/biz/CRaGLoader.java: Recompile with -Xlint:unchecked for details.
[info] done compiling
[info] compiling 7 Scala sources and 177 Java sources to /Users/tballard/vs_repo/redspro/out/reds/compile.dest/classes ...
[warn] 1 deprecation
[warn] 5 deprecations (since 2.13.0)
[warn] 3 deprecations (since 2.13.3)
[warn] 2 deprecations (since 2.13.7)
[warn] 11 deprecations in total; re-run with -deprecation for details
[warn] 2 feature warnings; re-run with -feature for details
[warn] 6 warnings found
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/biz/PageLoader.java: Some input files use or override a deprecated API.
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/biz/PageLoader.java: Recompile with -Xlint:deprecation for details.
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/biz/RecycleBin.java: Some input files use unchecked or unsafe operations.
[info] /Users/tballard/vs_repo/redspro/reds/src/main/java/org/redangus/redspro/biz/RecycleBin.java: Recompile with -Xlint:unchecked for details.
[info] done compiling
[info] compiling 7 Scala sources and 105 Java sources to /Users/tballard/vs_repo/redspro/out/reds/compile.dest/classes ...
[warn] 1 deprecation
[warn] 5 deprecations (since 2.13.0)
[warn] 3 deprecations (since 2.13.3)
[warn] 2 deprecations (since 2.13.7)
[warn] 11 deprecations in total; re-run with -deprecation for details
[warn] 2 feature warnings; re-run with -feature for details
[warn] 6 warnings found
...
and it compiles forever.
Note the number of files it thinks it needs to compile keeps changing.
The module had 2 java source directories and 1 scala source directory but changing that to 1 of each had no effect.
I have noticed this behavior with all mill versions since 0.9.4, for what that's worth.
The project I'm building is a ball of mud that is not particularly easy to distribute and run so it would not be trivial to give it to you to debug.
How can I help you solve this issue?
See https://github.com/sbt/sbt/issues/6183
See also comment https://github.com/sbt/zinc/issues/1120#issuecomment-1474874822 which describes a way to reproduce.