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/10/19 10:20:57 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2471: Refresh unloadable Gradle project after successful build

JaroslavTulach opened a new pull request #2471:
URL: https://github.com/apache/netbeans/pull/2471


   Continuation of #2464 - once a build on unloadable Gradle project successfully finishes, then let's schedule a reload to bring the module to loadable state:
   * opening unloadable project shall show a fix https://user-images.githubusercontent.com/26887752/96404352-fff94100-11da-11eb-931b-d6cdcbf1ed95.png 
   * after invoking it, the build is started
   * when finished, the project is refreshed
   
   Ideally the fix disappears and one can invoke "Start Debugging".


----------------------------------------------------------------
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] JaroslavTulach merged pull request #2471: Refresh unloadable Gradle/Maven project after successful build

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


   


----------------------------------------------------------------
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] JaroslavTulach commented on pull request #2471: Refresh unloadable Gradle/Maven project after successful build

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


   OK, let's try. Everything is green (except on `java.hints` batch), so I assume the change passes existing tests. Let's integrate.


----------------------------------------------------------------
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] JaroslavTulach commented on pull request #2471: Refresh unloadable Gradle project after successful build

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


   d7d4faf comes with a solution that (tries to) honor the existing `getReloadRule()`. As soon as the build succeeds, the `ExecutorTask` wrapper listeners are notified and may immediately refresh the build state.
   
   Btw. the refresh is also made synchronous and only then the build is claimed to be over.


----------------------------------------------------------------
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] JaroslavTulach commented on pull request #2471: Refresh unloadable Gradle project after successful build

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


   OK, I'll investigate the `getReloadRule()` and why it is not in action in my case.


----------------------------------------------------------------
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] JaroslavTulach commented on pull request #2471: Refresh unloadable Gradle project after successful build

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


   The problem with the current approach is that the
   ```
        task.addTaskListener((Task t) -> {
                   try {
                       OutputWriter out1 = task.getInputOutput().getOut();
                       boolean canReload = project.getLookup().lookup(BeforeReloadActionHook.class).beforeReload(action, outerCtx, task.result(), out1);
                       if (needReload && canReload) {
                           String[] reloadArgs = RunUtils.evaluateActionArgs(project, mapping.getName(), mapping.getReloadArgs(), outerCtx);
                           prj.reloadProject(true, maxQualily, reloadArgs);
                       }
                       project.getLookup().lookup(AfterBuildActionHook.class).afterAction(action, outerCtx, task.result(), out1);
                       for (AfterBuildActionHook l : context.lookupAll(AfterBuildActionHook.class)) {
                           l.afterAction(action, outerCtx, task.result(), out1);
                       }
                   } finally {
                       task.getInputOutput().getOut().close();
                       task.getInputOutput().getErr().close();
                   }
               });
   ```
   code is invoke too late!
   
   I'd like the reload of the project to happen immediately after the build is over. However the task listener is notified tens of seconds later.


----------------------------------------------------------------
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] JaroslavTulach commented on pull request #2471: Refresh unloadable Gradle project after successful build

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


   Thanks Laszlo, however I have added few more changes meanwhile, so let's review again:
   * support for `ActionProgress` added to Gradle project, that's for @lkishalmi to review
   * `java.lsp.server` modified to invoke `BUILD` when the project seems misconfigured - a bit of `CompletableFuture` for @sdedic and @entlicher 
   * Maven project changes to refresh its state before build is over to be consistent with Gradle.
   
   With these changes running VSCode "Start Debugging" on broken Gradle (just create new project) and broken Maven (remove some `.m2/repository` entries) seems to work.


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