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/08/13 08:23:50 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2309: Various improvements inspired by working on VSCode extension

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


   Recently I was working on LSP VSCode extension. Before I could work on the polyglot debugging using NetBeans Truffle Debugger implementation, I had to polish the system to:
   
   * make the TypeScript debuggable
   * make the Java code debuggable
   * make it run in headless mode
   * and few more.
   
   My debugging improvements aren't ready yet, however I believe the existing VSCode extension is going to benefit from my changes even without debugging. I propose to integrate these changes into Apache NetBeans 12.2


----------------------------------------------------------------
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 a change in pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#discussion_r473281787



##########
File path: java/maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java
##########
@@ -218,4 +219,10 @@ public static boolean hasTestCompileOnSaveEnabled(RunConfig config) {
         return false;
     }
 
+    private static void invokeLaterWithUI(Runnable runnable) {
+        if (GraphicsEnvironment.isHeadless()) {
+            return;
+        }

Review comment:
       Understood - when I first read the method name, I assumed, that is intended to invoke the Runnable on the EDT. That made me wonder why `SwingUtilities#invokeLater` was not used, which led to me reading the method.




----------------------------------------------------------------
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 a change in pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#discussion_r473283988



##########
File path: java/java.lsp.server/vscode/.vscode/tasks.json
##########
@@ -0,0 +1,20 @@
+// See https://go.microsoft.com/fwlink/?LinkId=733558
+// for the documentation about the tasks.json format

Review comment:
       Ok - for me the important part is, that VSCode generates it so. I was just wondering why invalid JSON was created, but it seems web developers again ignored RFCs and invented a new format.




----------------------------------------------------------------
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 #2309: Various improvements inspired by working on VSCode extension

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


   > @JaroslavTulach OK. Are you not following dev@?
   
   I am sorry, I didn't read dev@ recently. I was completely focused on VSCode and elsewhere. Once all this PR checks got green, I integrated without realizing the master is supposed to be frozen. I should be more careful. This is a second time I made such mistake, I should learn my lesson.
   
   Possibly I was influenced by considering my change just a _robustness fix_ that cannot break anything. Running the diff and eliminating all VSCode specific changes:
   ```bash
   $ curl 'https://patch-diff.githubusercontent.com/raw/apache/netbeans/pull/2309.diff' \
     | grep ^diff | grep -v java/java.lsp.server | grep -v nbbuild/misc/prepare-bundles \
     | cut -f3 -d " "
   a/ide/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/DebuggerManagerListener.java
   a/java/debugger.jpda.truffle/manifest.mf
   a/java/debugger.jpda.truffle/nbproject/project.xml
   a/java/maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java
   a/java/maven/src/org/netbeans/modules/maven/execute/cmd/ExecutionEventObject.java
   a/nbbuild/build.xml
   a/platform/core.windows/src/org/netbeans/core/windows/services/DialogDisplayerImpl.java
   ```
   leaves us with `isHeadless()` checks:
   * [ide/spi.debugger.ui](https://github.com/apache/netbeans/pull/2309/files#diff-b9c79046b9548364065efd8dd282089d)
   * [maven](https://github.com/apache/netbeans/pull/2309/files#diff-f038edf85db71cd67a5b2a356647847d)
   * [core.windows](https://github.com/apache/netbeans/pull/2309/files#diff-6aff1792e1913ea7946414fd9420635b)
   
   these checks shall not influence the release as NetBeans IDE isn't running in headless mode. Then there is another robustness check:
   * [IOFolding.isSupported](https://github.com/apache/netbeans/pull/2309/files#diff-0fc693f406ad5eae6e15b6063d7bdba0)
   
   it shall not influence NetBeans IDE as NetBeans IDE is using `core.output2` implementation of output window which supports folding. One more robustness check is done in buildsystem:
   * [check Packages](https://github.com/apache/netbeans/pull/2309/files#diff-fa67ba03971f6d21c0ff2493bf5d922f)
   
   that only fixes problem of running `ant tryme` on GraalVM, other JVMs continue to behave the same. And then there is the change of dependencies in `debugger.jpda.truffle` module which replaces strict dependency on `java.kit` with a recommendation. That's the only change that changes some behavior in the NetBeans IDE - however as the `java.kit` is present in the NetBeans IDE the change shall be idempotent.
   
   With the robustness fixes in master my [debugging in VSCode branch](https://github.com/apache/netbeans/compare/master...JaroslavTulach:java-lsp-server-debugging-attempt2) is much cleaner. Nice, but poor excuse for the organizational problems my integration causes just before release of 12.1. Once again, please accept my apology. 


----------------------------------------------------------------
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 #2309: Various improvements inspired by working on VSCode extension

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


   We are still in feature freeze and this does not look like Neil reviewed. 
   
   Am 18. August 2020 17:51:20 MESZ schrieb Jaroslav Tulach <no...@github.com>:
   >Merged #2309 into master.
   >
   >-- 
   >You are receiving this because you are subscribed to this thread.
   >Reply to this email directly or view it on GitHub:
   >https://github.com/apache/netbeans/pull/2309#event-3667008101
   
   -- 
   Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.


----------------------------------------------------------------
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 #2309: Various improvements inspired by working on VSCode extension

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


   I have just built NetBeans from most recent `master` and started with fresh user directory. I can debug JavaScript in a Maven project that launches JavaScript via `ScriptEngineManager` and I can debug Node.js project on top of GraalVM that calls into Java.
   
   I am fine with leaving my accidental changes in. If you or others feel different, feel free to revert. Once again sorry for the mess.


----------------------------------------------------------------
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] neilcsmith-net commented on pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#issuecomment-675641365


   > From my POV we should back it out if we further changes for 12.1
   
   @matthiasblaesing yes, that is what I meant by my comment - I will definitely back it out _if_ we need changes, but at the moment I'm hopeful that the release branch is OK for the final release.
   
   This is assuming I'm correct at quick glance that nothing here will change sig file generation @JaroslavTulach ?


----------------------------------------------------------------
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] neilcsmith-net commented on pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#issuecomment-678808798


   OK, @matthiasblaesing @JaroslavTulach it looks like we need to merge #2325 for 12.1, which means we may need one more beta - so, do I revert this or keep it in? 


----------------------------------------------------------------
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] neilcsmith-net commented on pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#issuecomment-675569864


   @JaroslavTulach OK. Are you not following dev@?  (there was a message from @geertjanw about another PR we were hoping might be mergeable, but too late now for beta3).  Luckily this just missed release branch syncing, so might be OK to stay in if beta 3 becomes 12.1 release.  OTOH, if we need to merge fixes into master then this will need reverting out first.  I'll update here.


----------------------------------------------------------------
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 #2309: Various improvements inspired by working on VSCode extension

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


   Opps. I haven't realized that. I am sorry.


----------------------------------------------------------------
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] neilcsmith-net edited a comment on pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
neilcsmith-net edited a comment on pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#issuecomment-678808798


   OK, @matthiasblaesing @JaroslavTulach it looks like we need to merge #2325 for 12.1, which means we may need one more beta - so, do I revert this or keep it in for 12.1 release?


----------------------------------------------------------------
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] neilcsmith-net commented on pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#issuecomment-679142764


   Thanks, @JaroslavTulach that's fine with me. Will be in.


----------------------------------------------------------------
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 #2309: Various improvements inspired by working on VSCode extension

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


   Maybe relevant for @neilcsmith-net does the change set affect the 'normal' NetBeans build?
   
   Could it impact the release?
   
   
   Am 18. August 2020 17:57:27 MESZ schrieb Jaroslav Tulach <no...@github.com>:
   >Opps. I haven't realized that. I am sorry.
   >
   >-- 
   >You are receiving this because you commented.
   >Reply to this email directly or view it on GitHub:
   >https://github.com/apache/netbeans/pull/2309#issuecomment-675564653
   
   -- 
   Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.


----------------------------------------------------------------
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 #2309: Various improvements inspired by working on VSCode extension

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


   


----------------------------------------------------------------
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 a change in pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#discussion_r472656847



##########
File path: java/maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java
##########
@@ -218,4 +219,10 @@ public static boolean hasTestCompileOnSaveEnabled(RunConfig config) {
         return false;
     }
 
+    private static void invokeLaterWithUI(Runnable runnable) {
+        if (GraphicsEnvironment.isHeadless()) {
+            return;
+        }

Review comment:
       Yes, the method `invokeLaterWithUI` is used to change cursor on main `JFrame` of the application. That yields an exception in headless mode. Not mangling the cursor shape - e.g. skipping the runnable - is exactly what is needed in headless mode.




----------------------------------------------------------------
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 a change in pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#discussion_r472655413



##########
File path: java/java.lsp.server/vscode/.vscode/tasks.json
##########
@@ -0,0 +1,20 @@
+// See https://go.microsoft.com/fwlink/?LinkId=733558
+// for the documentation about the tasks.json format

Review comment:
       This is what one gets when generating a skeletal VSCode project. Looks like these `.json` files accept comments, surprising - I might have used that instead of 2413e8b 




----------------------------------------------------------------
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] neilcsmith-net commented on pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#issuecomment-676502334


   @JaroslavTulach no worries!  You're not the only one. :smile:  Both Eric and I have used a [NOTICE] tag on dev@ for merge window opening and closing, etc.  If following all of dev@ gets a bit much (which it does!) might be worth filtering on that tag and a few others like that.


----------------------------------------------------------------
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 a change in pull request #2309: Various improvements inspired by working on VSCode extension

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2309:
URL: https://github.com/apache/netbeans/pull/2309#discussion_r472361995



##########
File path: java/java.lsp.server/vscode/.vscode/tasks.json
##########
@@ -0,0 +1,20 @@
+// See https://go.microsoft.com/fwlink/?LinkId=733558
+// for the documentation about the tasks.json format

Review comment:
       I noticed this in other JSON files aswell. Are these files from upstream somewhere or authored? This is not valid JSON (there is no comment in JSON (rfc7159)).

##########
File path: java/maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java
##########
@@ -218,4 +219,10 @@ public static boolean hasTestCompileOnSaveEnabled(RunConfig config) {
         return false;
     }
 
+    private static void invokeLaterWithUI(Runnable runnable) {
+        if (GraphicsEnvironment.isHeadless()) {
+            return;
+        }

Review comment:
       This looks a bit strange - is this intended, that this invocation silently drops the execution of the runnable? I would be a bit surprised if trying to debug.




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