Open fuyou001 opened 2 years ago
I'm using JDK 17 and this won't compile for me because of various bad path element
warnings and -Werror
being set in the javac options.
The upgrade-system-tests-XX
projects have no sources under main
, only under test
so Bloop doesn't create the output classes dir so javac, for dependent projects, complains that classes dir doesn't exist.
To fix this for now I...
1) removed "-Werror",
from all the .bloop/*.json
files
2) ran restart build server
3) ran clean, compile workspace
It now has issues with missing files - which is down to source generation not having run so I...
1) ran ./gradlew processMessages processTestMessages
2) ran clean, compile workspace
Now I'm getting bad option: '-release'
so I...
1) removed "-release", "8",
from the scala
section of all the .bloop/*.json
files that had it in.
2) ran restart build server
3) ran clean, compile workspace
I then had to introduce an error into Timer.scala
and fix it to get it to properly recompile. I shouldn't have to do this and it's probably due to all the changes I've made to the build files.
Now I can navigate round that file. Clicking on advanceClock
in timingWheel.advanceClock(bucket.getExpiration)
will take me to TimingWheel.scala
I think there are 3 issues here...
1) The javac compilation errors didn't appear on the Problems
tab - only in the logs so it's difficult to know the project isn't compiling. I don't know why this is.
2) How is the scala -release
flag working in Gradle but not in Bloop? I've no idea
3) Maybe the Gradle plugin should completely ignore empty directories when it exports to Bloop. This is the only way round -Werror
that I can see. Gradle gets round this issue by always creating a jar
or a test.jar
and Kafka gets round this issue by specifically naming the jar so the test jar and non test jar have the same name. Downside of this would be that bloopInstall
would have to be re-run if a new file was created in a directory that didn't exist before but the user expected it to be part of the build e.g. test/resources
.
I'll look into no. 3
The javac compilation errors didn't appear on the Problems tab - only in the logs so it's difficult to know the project isn't compiling. I don't know why this is.
I think exceptions don't show up properly, but we should be able to fix it in Bloop.
How is the scala -release flag working in Gradle but not in Bloop? I've no idea
That should really work, I think ScalaCLI uses that flag.
what's the plan to fix it ?
There is no progress currently, we haven't been able to look into it unfortunately.
Describe the bug
Expected behavior
expected to code navigation is work.
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.17.0
Extra context or search terms
Visual Studio Code version info
the log info