Open fanf opened 1 month ago
Since Maven also uses Zinc through scala-maven-plugin`, it might be possible to reproduce the exception by just using Maven in the terminal with the JetBrains JDK as above.
And... No. But maven plugin is extremely linear and non concurrent contrary to intellij that tries to parallelize as much as possible (for our joy), so if it's a threadsafety problem, it might be consistant (but it's just a guessing game here).
download JetBrains JDK (https://github.com/JetBrains/JetBrainsRuntime/releases)
If this doesn't happen on Zulu or Eclipse Temurin, I don't think we'd work on this issue. If there's some logical error in the concurrency handling, we'd be happy to review pull requests though.
@eed3si9n Oh ! I didn't test with azul, and actually I have the same error ! So I retested with Temurin... And now I get the error too. In the meantime, I deleted my whole .idea and started from a fresh one, so perhaps changed with that. Let me try a with a fresh user, fresh clone, fresh jvm install so that the reproduction step and qualification is actually OK.
@eed3si9n so, fresh linux user, fresh clone, fresh install of intellij, fresh everything. I can reproduce the problem with Azul zulu JDK with the updated steps in top post, ie with setting the scala compile server to use temurin 21 and the project to use zulu 21. If I set the scala compile server to zulu too, then the error disappear. So it seems that the problem arise when the compiler server JDK is not the same as the project.
I can't test setting JBR as a scala compile server JDK because then I get a NoClassDefFoundError: INIT
(perhaps a limitation of JBR).
So I don't know if the problem is in IntelliJ or zinc, but I does not seems to be directly linked to JBR.
For any guys investigating the issue but got hit with the following error when running ./rudder/rudder-web/src/main/build.sh
npm error code 1
npm error path /Users/jiahuitan/rudder/webapp/sources/rudder/rudder-web/src/main/node_modules/elm
npm error command failed
npm error command sh -c node install.js
npm error -- ERROR -----------------------------------------------------------------------
npm error
npm error I tried to get `elm` from @elm_binaries/darwin_arm64, but something went wrong.
npm error This can happen if you use the "--omit=optional" or "--no-optional" npm flag, or
npm error if your "node_modules" folder was copied over from a different computer (or VM).
Try first do a npm install elm
under the directory rudder/webapp/sources/rudder/rudder-web/src/main/
and that bypasses the issue for me
steps
git clone https://github.com/Normation/rudder.git
rudder/webapp/sources
and run./rudder/rudder-web/src/main/build.sh
to init the js/css env so that to avoid latter compilation errors unrelated to the problempath_of_clone/rudder/webapp/sources/pom.xml
Project Structure... > Platform Settings > SDK
, then+
and select the path to the previous root directories of the SDK ; then in "Project Settings > Project", choose either azul or jbr SDK ; Set the language level to17
Zinc
inSettings... > Build, Exec, Deploy > Compiler > Scala Compiler
top of the screen.Settings... > Build, Exec, Deploy > Compiler > Scala Compiler > Scala Compile Server
thenJVM > JDK
and change stack size to-Xss8m
;If you change the incremental compiler to
IDEA
it works. It used to work with IntelliJ 2024.1.x. It works if Temurin is chosen.problem
Note: I started by opening a ticket on JetBrains bug tracker (https://youtrack.jetbrains.com/issue/SCL-22939), but the root cause might be in Zinc thus that ticket too.
The compilation fails on the last project (
rudder-web
) with two stack traces which seems to indicate that the problem might be in Zinc (see at the end).I found an other project which had a very similar problem: https://github.com/jobrunr/jobrunr/issues/427 The cause was that the classpath resource manager was not thread safe as show in the correction: https://github.com/jobrunr/jobrunr/commit/248e098345d49eabd85bd267f0183c99ece49847
Exception 1 :
Exception 2 :