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 2021/10/02 16:10:20 UTC

[GitHub] [netbeans] jtulach opened a new pull request #3206: Verifying the quality of jdk-17+35

jtulach opened a new pull request #3206:
URL: https://github.com/apache/netbeans/pull/3206


   Verifying behavior of [nb-javac@jdk-17+35](https://github.com/JaroslavTulach/nb-javac/tree/jtulach/UseJdk17) generated automatically from JDK sources.


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


[GitHub] [netbeans] JaroslavTulach merged pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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






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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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



##########
File path: nbbuild/cluster.properties
##########
@@ -750,6 +749,8 @@ validation.nb.cluster.java=\
         java.hints,\
         java.kit
 
+#        java.source.nbjavac,\

Review comment:
       This PR doesn't remove the `java.source.nbjavac` sources yet. I can do it now, when the approach seems approved. With that I'd remove the `java.source.nbjavac` left over in `cluster.properties`.




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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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



##########
File path: java/java.source.base/src/org/netbeans/modules/java/source/indexing/VanillaCompileWorker.java
##########
@@ -405,6 +405,7 @@ public void run() throws IOException {
                 JavaIndex.LOG.log(Level.FINEST, "VanillaCompileWorker was canceled in root: " + FileUtil.getFileDisplayName(context.getRoot()), ca);  //NOI18N
             }
         } catch (Throwable t) {
+            t.printStackTrace();

Review comment:
       Done in 55b99a1 




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


[GitHub] [netbeans] jtulach edited a comment on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   I don't have problems editing JNA. Neither with JDK-8, neither with JDK-11.
   
   ![obrazek](https://user-images.githubusercontent.com/1842422/139007752-62a62d5d-deaa-464d-ac84-5129d5f500c3.png)
   
   Everything is exception-less. What will happen now?


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


[GitHub] [netbeans] jlahoda commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   @matthiasblaesing thanks for the investigation! I think you are correct with the problem. I guess I'd start with preferring exact matches, I can try to do that 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.

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


[GitHub] [netbeans] JaroslavTulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   Green! All the gates are green. Let's integrate and move NetBeans towards using the latest JDK `javac`!


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


[GitHub] [netbeans] mbien commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   would it be possible to only load the nb-javac module if NetBeans is started on a JDK with feature version older than the nb-javac version?
   
   the new nb-javac would not help if both have the same version (since it is basically identical), and if the JDK is more recent it only causes trouble.
   
   (i just closed several jira issues where users kept using nb 12.0 or 12.2 while updating to JDK 16 and nothing worked anymore - NB probably also needs a warning dialog to inform the user that the JDK is too new to be supported)


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


[GitHub] [netbeans] JaroslavTulach merged pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   


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


[GitHub] [netbeans] JaroslavTulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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






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


[GitHub] [netbeans] sdedic commented on a change in pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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



##########
File path: java/java.source.base/src/org/netbeans/modules/java/source/indexing/VanillaCompileWorker.java
##########
@@ -405,6 +405,7 @@ public void run() throws IOException {
                 JavaIndex.LOG.log(Level.FINEST, "VanillaCompileWorker was canceled in root: " + FileUtil.getFileDisplayName(context.getRoot()), ca);  //NOI18N
             }
         } catch (Throwable t) {
+            t.printStackTrace();

Review comment:
       LOG instead of printStackTrace() ?

##########
File path: nbbuild/cluster.properties
##########
@@ -750,6 +749,8 @@ validation.nb.cluster.java=\
         java.hints,\
         java.kit
 
+#        java.source.nbjavac,\

Review comment:
       leftover ?

##########
File path: nb/updatecenters/extras/nbjavac/manifest.mf
##########
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
 AutoUpdate-Show-In-Client: true
 OpenIDE-Module: org.netbeans.modules.nbjavac
 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/nbjavac/Bundle.properties
-OpenIDE-Module-Specification-Version: 2.0
+OpenIDE-Module-Specification-Version: 17.35

Review comment:
       A big leap forward !




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


[GitHub] [netbeans] matthiasblaesing commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   I now tried with Zulu 11 and Adoptium 11 and it works there, but it is still broken with the Ubuntu JDK 11 (from 21.10).
   
   As I know, that it will happen: Yes distribution JDKs can be broken, but before we break the default experience for all Ubuntu Users we should know _why_ it breaks there.


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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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



##########
File path: nbbuild/cluster.properties
##########
@@ -750,6 +749,8 @@ validation.nb.cluster.java=\
         java.hints,\
         java.kit
 
+#        java.source.nbjavac,\

Review comment:
       Removed in 26540ff 




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


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > This problem shall be fixed automatically as soon as this PR is merged. 
   > Then `java.source.nbjavac` disappears from the _NetBeans Distribution_ update center.
   
   I've just built new, fresh version from 92c782a8e3bb22, made sure there is no
   ```bash
   netbeans$ find nbbuild/ | grep java.source.nbjavac
   ```
   and then `ant tryme`. Creation of new Maven project succeeds, I am able to create a `Main` class and get code completion. No `java.source.nbjavac` gets downloaded. Looks like the above assumption was correct and we are good to go.


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


[GitHub] [netbeans] mbien commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   @matthiasblaesing great investigations! But wouldn't this already have to happen without the auto-javac patch?
   
   https://github.com/apache/netbeans/pull/3283 could you give this a try (once tests completed running)?


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


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > This problem shall be fixed automatically as soon as this PR is merged. 
   > Then `java.source.nbjavac` disappears from the _NetBeans Distribution_ update center.
   
   I've just built new, fresh version from 92c782a8e3bb22, made sure there is no
   ```bash
   netbeans$ find nbbuild/ | grep java.source.nbjavac
   ```
   and then `ant tryme`. Creation of new Maven project succeeds, I am able to create a `Main` class and get code completion. No `java.source.nbjavac` gets downloaded. Looks like the above assumption was correct and we are good to go.


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


[GitHub] [netbeans] JaroslavTulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > would it be possible to only load the nb-javac module if NetBeans is started on a JDK with feature version older than the nb-javac version? the new nb-javac would not help if both have the same version (since it is basically identical), and if the JDK is more recent it only causes trouble.
   
   The purpose of this PR isn't to change the UI or user workflow. That's completely orthogonal topic...
   
   > (i just closed several jira issues where users kept using nb 12.0 or 12.2 while updating to JDK 16 and nothing worked anymore - NB probably also needs a warning dialog to inform the user that the JDK is too new to be supported)
   
   +1 to the warning. Feel free to do that. It is unrelated to the question whether nb-javac is manually crafted or automatically backported. I think.
   
   


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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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



##########
File path: nbbuild/cluster.properties
##########
@@ -750,6 +749,8 @@ validation.nb.cluster.java=\
         java.hints,\
         java.kit
 
+#        java.source.nbjavac,\

Review comment:
       This PR doesn't remove the `java.source.nbjavac` sources yet. I can do it now, when the approach is approved. With that I'd remove the `java.source.nbjavac` left over in `cluster.properties`.




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


[GitHub] [netbeans] jtulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   I don't have problems editing JNA. Neither with JDK-8, neither with JDK-11.
   
   ![obrazek](https://user-images.githubusercontent.com/1842422/139007752-62a62d5d-deaa-464d-ac84-5129d5f500c3.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.

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


[GitHub] [netbeans] mbien commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > > would it be possible to only load the nb-javac module if NetBeans is started on a JDK with feature version older than the nb-javac version? the new nb-javac would not help if both have the same version (since it is basically identical), and if the JDK is more recent it only causes trouble.
   > 
   > The purpose of this PR isn't to change the UI or user workflow. That's completely orthogonal topic...
   
   it is not as orthogonal as it may seem and also fairly independent from UI or user workflow. The situation changed with auto-nb-javac being very similar to javac of the same version. I would not have asked the same question of manual-nb-javac v11 running on JDK 11. Running auto-nb-javac v17 on JDK 17 gives no benefit. I think discussing this before integrating auto-nb-javac to at least have a general idea how to proceed does not hurt, even when not everything is solved in this PR.


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


[GitHub] [netbeans] matthiasblaesing commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > Hello @matthiasblaesing, there seems to be:
   > 
   > ```
   > org.netbeans.modules.java.source.nbjavac [1.15.0.1.4.25.5.1 1 Netbeans/netbeans-linux-644-on-20211025]
   > ```
   > 
   > installed. Please remove it and try again. See the updated PR description for details. Sorry for not describing the problem earlier.
   
   Ok - with this hint, I get a step further, but now I get error when opening java classes. As reference, I use https://github.com/java-native-access/jna and tried to open `com.sun.jna.Native`. The class opens, but I get immediately error messages like:
   
   ```
   SEVERE [org.openide.util.Exceptions]
   java.lang.IllegalArgumentException
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.netbeans.modules.java.hints.spiimpl.JackpotTrees.createInstance(JackpotTrees.java:102)
   Caused: java.lang.IllegalStateException
   	at org.netbeans.modules.java.hints.spiimpl.JackpotTrees.createInstance(JackpotTrees.java:117)
   	at org.netbeans.modules.java.hints.spiimpl.JackpotTrees.createVariableWildcard(JackpotTrees.java:208)
   	at org.netbeans.modules.java.hints.spiimpl.JackpotTrees$CatchWildcard.<init>(JackpotTrees.java:165)
   	at org.netbeans.modules.java.hints.spiimpl.Utilities$JackpotJavacParser.catchClause(Utilities.java:1443)
   	at com.sun.tools.javac.parser.JavacParser.parseSimpleStatement(JavacParser.java:2844)
   	at org.netbeans.lib.nbjavac.services.NBParserFactory$NBJavacParser.parseSimpleStatement(NBParserFactory.java:133)
   	at com.sun.tools.javac.parser.JavacParser.blockStatement(JavacParser.java:2632)
   	at com.sun.tools.javac.parser.JavacParser.blockStatements(JavacParser.java:2569)
   	at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2539)
   	at com.sun.tools.javac.parser.JavacParser.block(JavacParser.java:2553)
   ```
   
   And here is the full log including the dumps [messages.zip](https://github.com/apache/netbeans/files/7421287/messages.zip)
   
   I don't see the mentioned module anymore, so I assume removing it was successful.
   


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


[GitHub] [netbeans] sdedic edited a comment on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   @mbien: The range of JDKs our users use is broad. Considering just JDK17, even minor changes in javac in its patch releases can potentially affect IDE's operation.  With bundled Javac (e.g. the automatically generated one), Apache NetBeans controls (and can test before update) what version will be shipped with a release. We have no such control over user's execution evnironmnet. If we do some magic depending on the actual runtime of the user, the user may face "random" errors depending on automatic OS updates (newer JDK patch release installed) etc.
   
   I am against introducing such magic, and if so, it should be opt-in, not the default.


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


[GitHub] [netbeans] jtulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   Hello @matthiasblaesing, there seems to be:
   ```
   org.netbeans.modules.java.source.nbjavac [1.15.0.1.4.25.5.1 1 Netbeans/netbeans-linux-644-on-20211025]
   ```
   installed. Please remove it and try again. See the updated PR description for details. Sorry for not describing the problem earlier. 


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


[GitHub] [netbeans] mbien commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > @mbien: The range of JDKs our users use is broad. Considering just JDK17, even minor changes in javac in its patch releases can potentially affect IDE's operation. With bundled Javac (e.g. the automatically generated one), Apache NetBeans controls (and can test before update) what version will be shipped with a release. We have no such control over user's execution evnironmnet. If we do some magic depending on the actual runtime of the user, the user may face "random" errors depending on automatic OS updates (newer JDK patch release installed) etc.
   > 
   > I am against introducing such magic, and if so, it should be opt-in, not the default.
   
   Thanks for answering. Thats actually the first time i got an answer for that question. The concern is that a JDK update release could introduce incompatible changes, so it is safer to run nb-javac N on JDK N instead of using the JDK's compiler - understood, 
   
   However, if it is undesired to provide a way to conditionally disable nb-javac for N+1 too, it will make it impossible to test upstream JDK versions unfortunately, since NB will use the backported javac instead of the compatible one, I used NB for it so far since it made sense to run an IDE which also uses the compiler of the underlying ea JDK you want to test, but there are other options.


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


[GitHub] [netbeans] JaroslavTulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   Green! All the gates are green. Let's integrate and move NetBeans towards using the latest JDK `javac`!


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


[GitHub] [netbeans] sdedic commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   The range of JDKs our users use is broad. Considering just JDK17, even minor changes in javac in its patch releases  releases can potentially affect IDE's operation.  With bundled Javac (e.g. the automatically generated one), Apache NetBeans controls (and can test before update) what version will be shipped with a release. If we do some magic depending on the actual runtime, the user may face "random" errors depedning on automatic OS updates (newer JDK patch release installed) etc.
   I am against introducing such magic, and if so, it should be opt-in, not the default.


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


[GitHub] [netbeans] sdedic edited a comment on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   The range of JDKs our users use is broad. Considering just JDK17, even minor changes in javac in its patch releases can potentially affect IDE's operation.  With bundled Javac (e.g. the automatically generated one), Apache NetBeans controls (and can test before update) what version will be shipped with a release. We have no such control over user's execution evnironmnet. If we do some magic depending on the actual runtime of the user, the user may face "random" errors depending on automatic OS updates (newer JDK patch release installed) etc.
   
   I am against introducing such magic, and if so, it should be opt-in, not the default.


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


[GitHub] [netbeans] JaroslavTulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > This problem shall be fixed automatically as soon as this PR is merged. 
   > Then `java.source.nbjavac` disappears from the _NetBeans Distribution_ update center.
   
   I've just built new, fresh version from 92c782a8e3bb22, made sure there is no
   ```bash
   netbeans$ find nbbuild/ | grep java.source.nbjavac
   ```
   and then `ant tryme`. Creation of new Maven project succeeded, I was able to create a `Main` class and get code completion. No `java.source.nbjavac` gets downloaded. Looks like the above assumption was correct and we are good to go.


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


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   > This problem shall be fixed automatically as soon as this PR is merged. 
   > Then `java.source.nbjavac` disappears from the _NetBeans Distribution_ update center.
   
   I've just built new, fresh version from 92c782a8e3bb22, made sure there is no
   ```bash
   netbeans$ find nbbuild/ | grep java.source.nbjavac
   ```
   and then `ant tryme`. Creation of new Maven project succeeds, I am able to create a `Main` class and get code completion. No `java.source.nbjavac` gets downloaded. Looks like the above assumption was correct and we are good to go.


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


[GitHub] [netbeans] JaroslavTulach commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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






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


[GitHub] [netbeans] JaroslavTulach merged pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   


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


[GitHub] [netbeans] matthiasblaesing commented on pull request #3206: Update to nb-javac identical to javac from jdk-17+35

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


   I think I found the issue and I think it is a bug in Jackpot. The exception is raised when the fake class for `JCVariableDecl` is being created. The constructor is looked up with 
   
   ```java
   new Class<?>[] {JCModifiers.class, Name.class, JCExpression.class, JCExpression.class, VarSymbol.class}
   ```
   
   or
   
   ```java
   new Class<?>[] {JCModifiers.class, Name.class, JCExpression.class, JCExpression.class, VarSymbol.class, List.class}
   ```
   
   The code, that does the lookup is found here
   
   https://github.com/apache/netbeans/blob/76448e5011d37650a804a9a1c4fdf36f676807f3/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java#L88-L100
   
   JDK 17 declares 3 constructors for `JCVariableDecl` (see: https://github.com/openjdk/jdk/blob/jdk-17+35/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java#L983-L1016)
   
   1. `JCModifiers, Name, JCExpression, JCExpression, VarSymbol`
   2. `JCModifiers, Name, JCExpression, JCExpression, VarSymbol, boolean`
   3. `JCModifiers, JCExpression, JCExpression`
   
   Only the first constuctor lookup described at the start of this article is relevant, as the second lookup does not match none of the constructors. The issue is, that the first lookup has to matching constructors: 1 + 2.
   
   And indeed debugging I see this:
   
   **Working case (Zulu, Adoptium)**
   
   ![image](https://user-images.githubusercontent.com/2179736/139313875-ad7235b6-b6a9-4480-94ba-9e866fc2eb4e.png)
   
   **Failing case (Ubuntu JDK 11)**
   
   ![image](https://user-images.githubusercontent.com/2179736/139313949-ea7bce06-ddde-45ca-ab40-5f2a8c67502f.png)
   
   In the failing case, the constructor has the required minimum number of parameters (check in line 89) and starts with the right parameter types (check in lines 91-95), but the final primitive boolean parameter is most probably the problem. In line 99 missing parameters are replaced with `null`. Now the VM either throws because it can't unbox `null` to a `boolean` or because a primitive can't be set from a reference.
   
   The problem is present on both JDKs, it only materializes on the Ubuntu JDK, because there the constructors are returned in a different order, than on the Zulu and Adoptium builds. But this is _not_ a bug in Ubuntu, as there is no guaranteed order (at least it is missing from the method documentation: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getConstructors())
   
   I think `JackpotTrees#createInstance` could be stabilized by
   - preferring exactly matching constructors
   - ignoring constructors, that can't be satisfied by extending parameter list with null (i.e. which have primitive arguments beyond the supplied arguments)
   
   @jlahoda what do you think?


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