You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maven successfully builds and runs tests but VsCode reports a missing type. The type is part of the source code and is package private. This has occurred with two Types, both of which are package private.
e.g., stdout on running the application:
io.vertx.core.impl.NoStackTraceThrowable: Unresolved compilation problems:
SQLquery cannot be resolved to a variable
SQLquery cannot be resolved to a type
SQLquery cannot be resolved to a variable
SQLquery cannot be resolved to a variable
Ignore the fact that it's vert.x that's being used to run it. This problem is new and possibly related to whatever broke the code formatter extension. I was successfully running this code using VsCode's code lens all day. I reloaded after updating extensions and ever since, I am seeing the Java Server fail to pick up Types in my project. If I open an editor of a Type that references package private members, the Type (say Type A) shows those as missing. If I ctrl+click to open the "missing" type (say Type B), a new editor opens to Type B and the compilation error in Type A goes away. However, if I run the code, the console output tells me I have a code compilation problem. At a minimum, VsCode should not start my application's main method without prompting me to continue, if I actually have a compilation error.
Environment
Operating System: Windows 10 using a WSL workspace
cat /etc/debian_version
bullseye/sid
uname -a
Linux BEASTIE 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
JDK version: > java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10, mixed mode, sharing)
Unfortunately, or fortunately, I can't reproduce. I refactored my code a number of times trying to find the compilation problem. I now have my code compiling and running. In my steps to find the problem, I never did isolate it. Maven could always build and run tests and VsCode didn't show compilation failures but couldn't run the code. In the end, I must have solved it, because vsc is working and I have reduced the visibility of my Types back to package private.
I'll close this for now, because the problem is too hard to reproduce.
Maven successfully builds and runs tests but VsCode reports a missing type. The type is part of the source code and is package private. This has occurred with two Types, both of which are package private.
e.g., stdout on running the application:
io.vertx.core.impl.NoStackTraceThrowable: Unresolved compilation problems:
SQLquery cannot be resolved to a variable
SQLquery cannot be resolved to a type
SQLquery cannot be resolved to a variable
SQLquery cannot be resolved to a variable
Ignore the fact that it's vert.x that's being used to run it. This problem is new and possibly related to whatever broke the code formatter extension. I was successfully running this code using VsCode's code lens all day. I reloaded after updating extensions and ever since, I am seeing the Java Server fail to pick up Types in my project. If I open an editor of a Type that references package private members, the Type (say Type A) shows those as missing. If I ctrl+click to open the "missing" type (say Type B), a new editor opens to Type B and the compilation error in Type A goes away. However, if I run the code, the console output tells me I have a code compilation problem. At a minimum, VsCode should not start my application's main method without prompting me to continue, if I actually have a compilation error.
Environment
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: