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 2020/12/16 06:52:06 UTC

[GitHub] [netbeans] jlahoda opened a new pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

jlahoda opened a new pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598


   So, the problem here is that some Maven projects have a `module-info` for module `$m` in `src/main/java` and another for `$m` in `src/test/java`, which overrides the main one. (Note the module names are the same.) The `maven-compiler-plugin` will then put the `src/main/java` on patch path for (test) `$m`:
   https://github.com/apache/maven-compiler-plugin/blob/1b206fe40156bb9814ed8b804a23362ec2b41daa/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java#L335
   
   This is an attempt to simulate this inside NetBeans, although I am by far not sure if it is correct. It:
   -does the tweak in the module projects to include the `--patch-module` option
   -tweaks `PatchModuleManager`, so that if we have caches for the main sources, we use the caches
   -tweaks the `ClassPath` content so that the "IDE-view" classpath for tests was a reference to the main sources, so that navigation from tests to sources works.


----------------------------------------------------------------
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.

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] geertjanw commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781506257


   Yes, try with 15 or lower to see if you can reproduce.


----------------------------------------------------------------
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.

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] matthiasblaesing commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-751460025


   @jlahoda the issue author tested the change and found it fixed the issue for him. I had a look at the change and I did not see obvious problems, but I'm not an expert in that area. Should we hold back merging or can it go in from your POV?


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781530119


   Methinks, this is a feature that even IntelliJ doesn't support: see https://youtrack.jetbrains.com/issue/IDEA-171419 and linked issues.
   
   /cc @akozlova


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-753580428


   I'll give it try, too. Soon™️.


----------------------------------------------------------------
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.

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] PavelKastornyy commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
PavelKastornyy commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-751461251


   Please, don't hold back merging. This feature is really necessary. Maven surefire and failsafe have been been supporting in-module testing for a long time.


----------------------------------------------------------------
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.

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] PavelKastornyy commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
PavelKastornyy commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-768462839


   @sormuras Apache NetBeans 12.3-beta1 available for testing. If you want to take a look, it is the right time.


----------------------------------------------------------------
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.

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] jlahoda commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
jlahoda commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-752221914


   Ok, lets try with this patch, and fix if it breaks something.


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781539495


   Done: https://twitter.com/sormuras/status/1362465668076044299


----------------------------------------------------------------
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.

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] jlahoda merged pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
jlahoda merged pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598


   


----------------------------------------------------------------
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.

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] sormuras edited a comment on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras edited a comment on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781526671


   Back on topic.
   
   Project under test: https://github.com/sormuras/testing-in-the-modular-world/
   Created `src/test/java/module-info.java` with the following content:
   
   ```java
   open /*test*/ module foo {
     exports foo;
     requires org.junit.jupiter.api;
   }
   ```
   ... which is what I invented [module-info.test](https://github.com/sormuras/testing-in-the-modular-world/blob/master/src/test/resources/module-info.test) for, back in the days.
   
   And... it looks good to me.
   
   ![image](https://user-images.githubusercontent.com/2319838/108399344-4bb80780-721a-11eb-8595-9e38b1db098f.png)
   
   Caveat: I'm not sure why Maven/NB says "1 tests skipped." Didn't look into the project for years...


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781503880


   Tried to start Apache NetBeans 12.3-beta3 and got an error.
   
   ![image](https://user-images.githubusercontent.com/2319838/108395138-c5012b80-7215-11eb-87ea-22b52675dcdb.png)
   
   Is Java 16 (it's on the PATH) too high?
   


----------------------------------------------------------------
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.

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] PashaTurok commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
PashaTurok commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-846706624


   @jlahoda  Could you take a look at this [issue ](https://issues.apache.org/jira/browse/NETBEANS-5704)? It is a small bug.


-- 
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.

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] geertjanw commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781531670


   Tell the world, tweet it, @sormuras. :-)


----------------------------------------------------------------
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.

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] geertjanw commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781510843


   Great. Try the same for JDK 16, though not supported yet, should work too.


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781511052


   Even starts with `netbeans_jdkhome="D:\dev\jdk\jdk-16"`. 👍 
   


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781526671


   Back on topic.
   
   Project under test: https://github.com/sormuras/testing-in-the-modular-world/
   Created `src/test/java/module-info.java` with the following content:
   
   ```java
   open /*test*/ module foo {
     exports foo;
     requires org.junit.jupiter.api;
   }
   ```
   ... which is what I invented [module-info.test](https://github.com/sormuras/testing-in-the-modular-world/blob/master/src/test/resources/module-info.test) for, back in the days.
   
   And... it looks good to me.
   
   ![image](https://user-images.githubusercontent.com/2319838/108399344-4bb80780-721a-11eb-8595-9e38b1db098f.png)
   
   Caveat: I'm not sure why Maven/NB says "1 tests skipped." Did look into the project for years...


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781510090


   My fault. Setting `netbeans_jdkhome="D:\dev\jdk\jdk-15.0.1"` in `etc/netbeans.conf` did the trick.


----------------------------------------------------------------
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.

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] sormuras commented on pull request #2598: [NETBEANS-4550] Handling tests that have a module-info overriding module-info from sources.

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #2598:
URL: https://github.com/apache/netbeans/pull/2598#issuecomment-781507599


   Same same.
   
   ![image](https://user-images.githubusercontent.com/2319838/108396066-b5cead80-7216-11eb-871e-acf9d1bb991a.png)
   


----------------------------------------------------------------
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.

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