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

Frequent "class not found" errors; concurrent mill instances suspected cause #3454

Open
nafg opened this issue Sep 3, 2024 · 0 comments
Open

Comments

@nafg
Copy link
Contributor

nafg commented Sep 3, 2024

Most frequently, it's this:

An unexpected error occurred
Exception in thread "MillServerActionRunner" java.lang.ClassNotFoundException: millbuild.build$
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    at mill.runner.MillBuildBootstrap$.getRootModule(MillBuildBootstrap.scala:419)
    at mill.runner.MillBuildBootstrap.evaluateRec(MillBuildBootstrap.scala:147)
    at mill.runner.MillBuildBootstrap.$anonfun$evaluate$1(MillBuildBootstrap.scala:49)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at mill.runner.MillBuildBootstrap.evaluate(MillBuildBootstrap.scala:48)
    at mill.runner.MillMain$.$anonfun$main0$6(MillMain.scala:234)
    at mill.runner.Watching$.watchLoop(Watching.scala:27)
    at mill.runner.MillMain$.$anonfun$main0$1(MillMain.scala:219)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at mill.api.SystemStreams$.$anonfun$withStreams$5(SystemStreams.scala:78)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at mill.api.SystemStreams$.$anonfun$withStreams$4(SystemStreams.scala:77)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at mill.api.SystemStreams$.$anonfun$withStreams$3(SystemStreams.scala:76)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at scala.Console$.withErr(Console.scala:193)
    at mill.api.SystemStreams$.$anonfun$withStreams$2(SystemStreams.scala:75)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at scala.Console$.withOut(Console.scala:164)
    ...

But often Mill runs, but then compilation fails with random "not found" and "Symbol 'type XXX' is missing from the classpath" compiler errors.

Mill version: 0.11.12

IDE: IntelliJ, via BSP import, with BSP build automatically on file save usually enabled

I use tmuxp with this file:

session_name: 'chesednow-disp-dev'
windows:
- start_directory: /home/naftoli/repositories/gitlab.com/chesednow/disp
  window_name: fish
  layout: e438,159x39,0,0[159x19,0,0{143x19,0,0,7,15x19,144,0,6},159x19,0,20{143x19,0,20,8,15x19,144,20,9}]
  panes:
  - mill -j 16 -w app_lrbcol.runBackground
  - docker compose up db
  - sleep 5; mill -j 16 -w app_js.getScalaJs
  - $SHELL

getScalaJs is a task that triggers webpacking etc. There are shared modules that app_lrbcol (JVM) and app_js (JS) modules depend on transitively (as well as many platform-specific modules)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant