Open bumby123 opened 1 year ago
I find it hard to follow your example - can you attach a zip with a reproducer?
Good morning Max, thank you for your help, I will send you the link to the repository with the complete project and instructions to execute it.
This is an upstream Eclipse issue. The related issues:
A workaround: move the feeding directory to a separate project.
Amm what is upstream Eclipse issue? There is not solution for vsc? Is that for each module-info. java file I would have create separate projects? Amm There will be some way to disable that false compilation error because in the end the code does work, it's just those red lines that cause confusion
Amm what is upstream Eclipse issue
See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1465
There is not solution for vsc? Is that for each module-info. java file I would have create separate projects?
Right.
I understand the truth, creating independent projects for each module-info seems a bit inappropriate. Maybe there is an option in the visual studio code to disable build error warnings only in specific project folders, perhaps by manipulating the settings or launch json?
As I happened to find this issue just now, I tried the steps in the description using ecj instead of javac, and there's only one warning I see in all this:
----------
1. WARNING in xxx/modules-java-17-problem-vsc-master/care/zoo/animal/care/details/HippoBirthday.java (at line 7)
private Task task;
^^^^
The value of the field HippoBirthday.task is not used
----------
1 problem (1 warning)
Other than that compilation and running works flawlessly.
Apparently, this is not a problem of the compiler, but of how vscode configures the "project". Is a project in vscode directly mapped to what jdt calls a project? How does vscode invoke the compiler, from which directory, which options are being passed?
Environment