Open vorburger opened 9 months ago
This is where the message is sent https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/a55e3241e7533bc2f45a46ee9287b6a16f37c973/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java#L2349-L2358 . With bazel-vscode-java
, I can still see automatic
being sent to the language server and we don't ever set it to anything else. Unfortunately I can't really confirm the behaviour because I haven't go the bazel binary to properly test.
Bazel contributes some bundles to the JDT-LS runtime from https://github.com/salesforce/bazel-eclipse :
"bundles": [
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.github.ben-manes.caffeine.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.github.ben-manes.caffeine.guava.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/org.jsr-305.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/org.fusesource.jansi.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/wrapped.com.google.protobuf.protobuf-java.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.salesforce.bazel.logback.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.salesforce.bazel.importedsource.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.salesforce.bazel.sdk.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.salesforce.bazel.eclipse.core.jar",
"/home/rgrunber/vscode-test/extensions/sfdc.bazel-vscode-java-1.2.0/server/com.salesforce.bazel.eclipse.jdtls.jar"
],
but I don't see anything in there to override the null analysis setting. Those bundles are probably helping to resolve the classpath, which is used by the null analysis to detect if its present, but if the automatic
is set, it should never prompt.
What happens if you set "java.compile.nullAnalysis.mode": "automatic"
at the user-level (instead of workspace) ? Does it still occur ?
It seems like the
java.compile.nullAnalysis.mode
settings doesn't quite work as documented:I have it set to
"java.compile.nullAnalysis.mode": "automatic"
here, but it still keeps re-prompting me: (Every time I do Java: Clean Java Language Server Workspace.)Note that my project (https://github.com/enola-dev/enola) uses https://github.com/salesforce/bazel-vscode-java - I'm not sure if this settings somehow needs to be "piped through" by that extension to the internal JDT project configuration, so unclear (to me) if the gap is here in the
eclipse.jdt.ls
project or missing there?@CsCherrYY @rgrunber @testforstephen @mickaelistria @guw
PS: https://www.lastnpe.org greetings!