Open Petersoj opened 3 months ago
Update: Reinstalling the extension appears to have fixed this issue. Not sure why it happened in the first place though. Will leave this issue open for now. Feel free to close this issue if you can't reproduce it. Another update: The issue appears intermittent. Hard to exactly reproduce. But this is still an issue.
Gradle enables Java library authors to specify what dependencies should be transitively exposed to a consumer using the
api
orimplementation
configurations in the dependencies section of the library's build script. When a Gradle application project attempts to use a class from a transitive dependency of a library that has declared that dependency non-transitively exposed (usingimplementation
), thegradle build
command fails at the import declaration as expected, but this extension reports no errors in VS Code likely because it sees the dependency on the classpath and ignores its transitive visibility setting. This extension will also provide hinting and code completion for a non-transitively exposed library, which shouldn't be happening.Environment
Steps To Reproduce
Test.java
in VS Code and observe no compilation errors reported by this language server extension.gradle build
, which will fail, and observe the compilation errors due toTest.java
attempting to access the class of a non-transitively exposed dependency (com.google.common.base.Preconditions
in the example) of thealpaca-java
library.Reproduction project: workspace.zip Logs: Log.txt (nothing out of the ordinary)
Current Result
VS Code shows no errors:
Expected Result
IntelliJ does show errors: