You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/07/20 03:02:35 UTC
[GitHub] [netbeans] mbraude-chwy opened a new issue, #4406: Java Language Service for VS Code cannot detect app code in unit tests
mbraude-chwy opened a new issue, #4406:
URL: https://github.com/apache/netbeans/issues/4406
### Apache NetBeans version
Apache NetBeans 14
### What happened
My VS Code editor can no longer resolve symbols from my application code when authoring unit tests. This makes it impossible to write or create new Java unit tests.
### How to reproduce
1) Create a new directory to hold a blank gradle project.
2) run the gradle project initialization with: `gradle init`, then select:
- '2' for application.
- '3' for Java.
- '1' for no.
- '1' for 'Groovy'
- '4' for 'JUnit Jupiter'
3) After the project is created, launch VS Code with `code .`. Make sure that the Apache Netbeans Language Service extension is installed.
4) Open AppTest.java
OBSERVE: You will see squiggles underneath the 'App' symbol because the language service cannot resolve 'App'. It will resolve all test code but not product code.
NOTE: The gradle build will succeed, and the 'Test' task will as well. However the language service cannot resolve any product code which makes it impossible to actually write tests with Netbeans.
I am fairly certain that this used to work....though I do not remember.
### Did this work correctly in an earlier version?
Apache NetBeans 13
### Operating System
Ubuntu 18.04.0 om Windows 11 via WSL
### JDK
11.0.12-open
### Apache NetBeans packaging
Other
### Anything else
This is really blocking me from getting any work done, so I would greatly appreciate a workaround ASAP!
### Are you willing to submit a pull request?
Yes
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] adamoutler commented on issue #4406: Java Language Service for VS Code cannot detect app code in unit tests
Posted by GitBox <gi...@apache.org>.
adamoutler commented on issue #4406:
URL: https://github.com/apache/netbeans/issues/4406#issuecomment-1197079102
I understand this issue was reported for Gradle. However, I am seeing this same problem in Maven with two of my JavaFX Projects, in Netbeans 14. It seems tests and src are being treated by NetBeans as two separate packages and NetBeans is not auto-generating (test+main) folders together. My temporary maven-specific hack is 2-pronged.
1. Use `<build><testResources><testResource><directory>src/main/resources...` to add the required resources to the test
2. use `org.codehaus.mojo/build-helper-maven-plugin` set the goal `add-test-source`, set the config>sources>source `src/main/java`.
Maybe something similar can be done to gradle. You just need to merge the test+src directories in the generated sources somehow so NetBeans can see it properly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] neilcsmith-net closed issue #4406: Java Language Service for VS Code cannot detect app code in unit tests
Posted by GitBox <gi...@apache.org>.
neilcsmith-net closed issue #4406: Java Language Service for VS Code cannot detect app code in unit tests
URL: https://github.com/apache/netbeans/issues/4406
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] neilcsmith-net commented on issue #4406: Java Language Service for VS Code cannot detect app code in unit tests
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4406:
URL: https://github.com/apache/netbeans/issues/4406#issuecomment-1197086828
@mbraude-chwy could you test with 15-rc2? This is hopefully fixed. See the mailing list post on dev@ https://lists.apache.org/thread/qw4sd9kqy3c1lftwhl61ftpkcqcd6m0f Follow the artifacts link and see inside the vsix folder.
@adamoutler if this is the same as #4418 then your issue is probably separate. Please file a new issue with a reproducer if possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbraude-chwy commented on issue #4406: Java Language Service for VS Code cannot detect app code in unit tests
Posted by GitBox <gi...@apache.org>.
mbraude-chwy commented on issue #4406:
URL: https://github.com/apache/netbeans/issues/4406#issuecomment-1197342934
Hi @neilcsmith-net , thanks for pointing this to me. I tried the vsix from https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release150/11/artifact/dist/vsix/apache-netbeans-java-15.0.0.vsix and that fixes the issue. Thanks so much!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists