metals
metals copied to clipboard
multiple errors like "bad path element "... ": no such file or directory when building Apache Kafka
Describe the bug
Using VSCode with Scala(Metals) extension on the code of Apache Kafka (mixed Java/Scala built with Gradle).
Metals doctor shows lots of compilation status errors due to errors like this (from the metals log):
024.03.22 16:25:04 WARN Unexpected javac output: warning: [path] bad path element "../kafka/.bloop/core-test/build/classes-empty-core-test": no such file or directory
warning: [path] bad path element ".../kafka/storage/api/src/test/resources": no such file or directory
error: warnings found and -Werror specified
1 error
2 warnings.
2024.03.22 16:25:04 WARN javac exited with exit code 1
2024.03.22 16:25:04 INFO time: compiled core-test in 29s
If the directories are created manually, then the status goes green. As there are many such errors, it takes a long time to manually 'fix' the project
Expected behavior
Can the missing directories be auto-created if they do not exist ?
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
Metals version: 1.2.2
Extra context or search terms
VSCode metals extesnion v 1.29.0
No response
Thanks for reporting! This looks like something to fix inside Bloop. We should probably not invoke the Java compiler with directories that do not exists