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/01/16 19:06:11 UTC

[GitHub] [netbeans] matthiasblaesing edited a comment on issue #1871: [NETBEANS-3115] Resolve third-party source against open Gradle projects.

matthiasblaesing edited a comment on issue #1871: [NETBEANS-3115] Resolve third-party source against open Gradle projects.
URL: https://github.com/apache/netbeans/pull/1871#issuecomment-575297369
 
 
   How do they behave different? They define binary dependencies and these can have sources attached. My scenario I tested:
   
   - I create a project `library` (just a `DemoLib` class with a `dummyMethod`)
   - I `maven -Prelease-profile install`ed version `1.0`, `2.0` and `3.0-SNAPSHOT`
   - I created an application project that depends on library version `3.0-SNAPSHOT`, both projects are open in netbeans
   - I invoke "Navigate -> Go to Source" on `demoLib.dummyMethod()`
   
   At this point netbeans takes me to the code in the project that I have open.
   
   - I change the dependency to `2.0`
   - I invoke "Navigate -> Go to Source" on `demoLib.dummyMethod()`
   
   At this point the source code of the source jar is opened and shown.
   
   - I checkout version `2.0` of `library`
   - I invoke "Navigate -> Go to Source" on `demoLib.dummyMethod()`
   
   At this point I'm taken to the source of the open project.
   
   From my perspective the behavior of the Integration of Maven in NetBeans in completely sane: If you have the source for a maven project open _and_ the version of the project matches the version of the dependency then the project source code is used, else the source jar is used to show the source.
   
   If you don't do this, you will get misleading results. I once accidentally chased a bug that I misdiagnosed, because the lines in the source code did not match the one in the stack trace because I had the wrong version opened.
   
   IMHO this would be a sane implementation for gradle as well.
   
   And here is the code I used to test: 
   [TestVersions.zip](https://github.com/apache/netbeans/files/4073228/TestVersions.zip)
   

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


With regards,
Apache Git Services

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