You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sdedic (via GitHub)" <gi...@apache.org> on 2024/08/12 09:34:04 UTC

[PR] Gradle implementation of Project (re)load API [netbeans]

sdedic opened a new pull request, #7665:
URL: https://github.com/apache/netbeans/pull/7665

   Gradle implementation, based on improvements in #7646 implementing SPI introduced in #7651.
   
   The implementation allows the caller to grant project trust when loading the project. Doing so requires **implementation** dependency on Gradle Projects module ... I hope that the ProjectReload will be soon (~ within 24 release cycle) move into project API and the impl dependency can be removed.


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on PR #7665:
URL: https://github.com/apache/netbeans/pull/7665#issuecomment-2316127635

   Stats would be good to observe the change in gradle after this merges. The test hack may stabilize some things, that's why I put it into the abstract test core many of the tests derive from.


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on PR #7665:
URL: https://github.com/apache/netbeans/pull/7665#issuecomment-2315091892

   During testing, I've discovered that `GradleSourcesImplTest` fails quite often. I invested nearly one day into hunting the cause - and was only able to cure some symptoms.
   The main issue is that the project Lookup initializes lazily; although the project impl itself uses `ProxyLookup.setLookups`, the delegates (actully wrapped `FolderLookup` ) start to initialize / recognize layer registrations and only after a while they asynchronously finalize, firing events that are propagated upwards through wrapper ProxyLookups. 
   
   This is a general problem and affetcs all (even production) code that uses pattern:
   ```
   Project p = FileOwnerQuery.findOwner(someFile);
   OpenProjects.open(new Project[] { p }, false);
   OpenProjects.openProjects().get();
   Sources srcs = ProjectUtils.getSources(p);
   ```
   though the client code even opens the project in a hope it will be fully initialized afterwards, the Sources may report no source groups as the java-specific provider might not be recognized/loaded yet. This happens randomly.
   
   In this PR, I've introduced [waitForProjectLookup](https://github.com/apache/netbeans/pull/7665/files#diff-efbe457805d005d95375ecf666a13cac9b397d17855e7911e4e4445acf34a9c2R47) that hides a hacky way how to wait for the project lookup's implementations to initialize.


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic merged PR #7665:
URL: https://github.com/apache/netbeans/pull/7665


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7665:
URL: https://github.com/apache/netbeans/pull/7665#issuecomment-2316110019

   the only maven related sporadic test failure I remember is https://github.com/apache/netbeans/issues/7263. But we could check [master merges](https://github.com/apache/netbeans/actions?query=branch%3Amaster) and build some statistics if needed since they have retry script warnings and also logs of my manual restarts.
   
   also note that contrary to the gradle tests, those are not wrapped in retry scripts. The retry scripts for gradle tests fire often.


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on PR #7665:
URL: https://github.com/apache/netbeans/pull/7665#issuecomment-2323431379

   If no objections are raised, will merge this PR tomorrow early morning.


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7665:
URL: https://github.com/apache/netbeans/pull/7665#issuecomment-2316054585

   note that gradle tests are known to be unreliable, `java/gradle.java` is already wrapped in a retry script. (and btw they can't run on JDK 21(!))
   
   So the problems experienced here could be new or potentially just highlight already existing issues by changing the timing. (one of the main issues of unreliable tests: you can never be sure)


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


Re: [PR] Gradle implementation of Project (re)load API [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on PR #7665:
URL: https://github.com/apache/netbeans/pull/7665#issuecomment-2316098427

   @mbien I am 90% sure the problem (or its root cause) is ages-old; will manifest itself primarily in tests, as the query almost immediately follows project open with a not-yet-recognized contents of the layers ... IMHO it affects the IDE only in a limited way, as in a typical "bootrstrap" the IDE displays whatever is available then refreshes on change events (which will come). But automated operations after POM/build.gradle change are in much greater danger, especially if adding a technology dependency (i.e. micronaut, spring, ...) to the project.
   
   This issue affects equally Maven  - and most probably any tests that setup maven/gradle project and then try to "read something", as e.g. java / micronaut / ejb providers do not initialize in a consistent way.
   
   I'd like to invent "something" that would allow the projects to fire e.g. another property change event on full initialization, but it will be ... rather hard; I'll try to minimize API changes.


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