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 2022/04/12 15:10:12 UTC

[GitHub] [netbeans] neilcsmith-net opened a new pull request, #3974: Upgrade to Disco v2.

neilcsmith-net opened a new pull request, #3974:
URL: https://github.com/apache/netbeans/pull/3974

   Upgrade to DiscoClient 2.0.23 to use Disco API v2. Now requires JDK 11. Removes HTTPClient library as DiscoClient uses JDK support.
   
   Makes the client ID, default distribution and default download location brandable.
   
   Moves to a non-hidden default download location (NetBeansJDKs). Using a hidden location makes re-registering difficult, and can hide a lot of disk usage. Logic is similar to that used in OpenProjectListSettings::getProjectsFolder - should be adjacent to NetBeansProjects by default.  Also uses tmp location in development.


-- 
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] neilcsmith-net merged pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net merged PR #3974:
URL: https://github.com/apache/netbeans/pull/3974


-- 
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] neilcsmith-net commented on pull request #3974: Upgrade to Disco v2.

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

   OK, pushed an update to `ValidateClassFilesTest` to handle higher class file versions based on module dependencies. Commit validation now passing.  Approach OK @jtulach @mbien @matthiasblaesing ?


-- 
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] neilcsmith-net commented on pull request #3974: Upgrade to Disco v2.

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

   Thanks @mbien The UI is on my list to revise for NB15.  You're right about the reason for the duplicates.  I didn't write the original NetBeans support for Disco and it predates a bunch of features in the API.  I want to bring our support more in line with other IDE plugins / [website](https://foojay.io/download/).


-- 
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] neilcsmith-net commented on a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850708089


##########
platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassFilesTest.java:
##########
@@ -120,4 +121,24 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
             }
         });
     }
+
+    private Map<String, Integer> calculateFileNameToVersion() {
+        Map<String, Integer> result = new HashMap<>();
+        for (Module module : Main.getModuleSystem().getManager().getModules()) {
+            for (Dependency dep : module.getDependencies()) {
+                if (dep.getType() == Dependency.TYPE_JAVA) {
+                    String javaVersion = dep.getVersion();
+                    if (javaVersion.startsWith("1.")) {
+                        break;

Review Comment:
   I meant `break`.  Shouldn't be more than one Java dependency in there? Should probably break after adding the files too.



-- 
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] neilcsmith-net commented on a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850706050


##########
java/java.disco/nbproject/project.properties:
##########
@@ -17,9 +17,8 @@
 
 is.autoload=true
 release.external/checker-qual-3.9.1.jar=modules/ext/checker-qual-3.9.1.jar
-release.external/discoclient-1.0.1.jar=modules/ext/discoclient-1.0.1.jar
-release.external/httpclient5-5.0.3.jar=modules/ext/httpclient5-5.0.3.jar
-release.external/httpcore5-5.0.2.jar=modules/ext/httpcore5-5.0.2.jar
-release.external/httpcore5-h2-5.0.2.jar=modules/ext/httpcore5-h2-5.0.2.jar
-javac.source=1.8
+release.external/jdktools-11.0.8.jar=modules/ext/jdktools-11.0.8.jar
+release.external/discoclient-2.0.23.jar=modules/ext/discoclient-2.0.23.jar
+javac.source=11
+javac.target=11

Review Comment:
   :smile:



-- 
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 a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850640976


##########
java/java.disco/nbproject/project.properties:
##########
@@ -17,9 +17,8 @@
 
 is.autoload=true
 release.external/checker-qual-3.9.1.jar=modules/ext/checker-qual-3.9.1.jar
-release.external/discoclient-1.0.1.jar=modules/ext/discoclient-1.0.1.jar
-release.external/httpclient5-5.0.3.jar=modules/ext/httpclient5-5.0.3.jar
-release.external/httpcore5-5.0.2.jar=modules/ext/httpcore5-5.0.2.jar
-release.external/httpcore5-h2-5.0.2.jar=modules/ext/httpcore5-h2-5.0.2.jar
-javac.source=1.8
+release.external/jdktools-11.0.8.jar=modules/ext/jdktools-11.0.8.jar
+release.external/discoclient-2.0.23.jar=modules/ext/discoclient-2.0.23.jar
+javac.source=11
+javac.target=11

Review Comment:
   awesome



##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -87,20 +90,58 @@ public synchronized MajorVersion getLatestSts(boolean b) {
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
             final Boolean javafxBundled) {
-        return getDisco().getPkgs(distribution, versionNumber, latest, operatingSystem, LibCType.NONE, architecture, Bitness.NONE, archiveType, packageType, javafxBundled, /*directlyDownloadable*/ true, ReleaseStatus.NONE, TermOfSupport.NONE, Scope.PUBLIC);
+//        return getDisco().getPkgs(distribution, versionNumber, latest, operatingSystem, LibCType.NONE, architecture, Bitness.NONE, archiveType, packageType, javafxBundled, /*directlyDownloadable*/ true, ReleaseStatus.NONE, TermOfSupport.NONE, Scope.PUBLIC);

Review Comment:
   nitpick: is this line supposed to stay? the vertical version is right below.



##########
java/java.disco/external/binaries-list:
##########
@@ -15,7 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 4FCCADF37F1C61A0895BAC3D42FE0C530438826C org.checkerframework:checker-qual:3.9.1
-C4BC772689D4BB2D4128C5E4966F765A8A76E904 org.apache.httpcomponents.client5:httpclient5:5.0.3
-EA298CD1CE1D860747149FBB5F6236300219F378 org.apache.httpcomponents.core5:httpcore5:5.0.2
-7CAEB2EEBDFB7ECA30E7F64E8138D977FC85AB80 org.apache.httpcomponents.core5:httpcore5-h2:5.0.2

Review Comment:
   bonus points for removing dependencies



##########
platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassFilesTest.java:
##########
@@ -120,4 +121,24 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
             }
         });
     }
+
+    private Map<String, Integer> calculateFileNameToVersion() {
+        Map<String, Integer> result = new HashMap<>();
+        for (Module module : Main.getModuleSystem().getManager().getModules()) {
+            for (Dependency dep : module.getDependencies()) {
+                if (dep.getType() == Dependency.TYPE_JAVA) {
+                    String javaVersion = dep.getVersion();
+                    if (javaVersion.startsWith("1.")) {
+                        break;

Review Comment:
   is `break` correct here? You don't want to check the other dependencies in the list? (did you mean `continue`?)



##########
java/java.disco/src/org/netbeans/modules/java/disco/SelectPackagePanel.java:
##########
@@ -177,6 +194,11 @@ protected void updateData(Distribution distribution, Integer featureVersion, Lat
                 .execute();
     }
 
+    @Override
+    protected void updateDistributions(List<Distribution> distros) {
+        super.updateDistributions(distros); //To change body of generated methods, choose Tools | Templates.

Review Comment:
   someone hasn't updated his code templates :P



-- 
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 a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850709177


##########
platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassFilesTest.java:
##########
@@ -120,4 +121,24 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
             }
         });
     }
+
+    private Map<String, Integer> calculateFileNameToVersion() {
+        Map<String, Integer> result = new HashMap<>();
+        for (Module module : Main.getModuleSystem().getManager().getModules()) {
+            for (Dependency dep : module.getDependencies()) {
+                if (dep.getType() == Dependency.TYPE_JAVA) {
+                    String javaVersion = dep.getVersion();
+                    if (javaVersion.startsWith("1.")) {
+                        break;

Review Comment:
   roger, just wanted to 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


[GitHub] [netbeans] neilcsmith-net commented on a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850706704


##########
java/java.disco/src/org/netbeans/modules/java/disco/Client.java:
##########
@@ -87,20 +90,58 @@ public synchronized MajorVersion getLatestSts(boolean b) {
     public synchronized List<Pkg> getPkgs(final Distribution distribution, final VersionNumber versionNumber, final Latest latest, final OperatingSystem operatingSystem,
             final Architecture architecture, final ArchiveType archiveType, final PackageType packageType,
             final Boolean javafxBundled) {
-        return getDisco().getPkgs(distribution, versionNumber, latest, operatingSystem, LibCType.NONE, architecture, Bitness.NONE, archiveType, packageType, javafxBundled, /*directlyDownloadable*/ true, ReleaseStatus.NONE, TermOfSupport.NONE, Scope.PUBLIC);
+//        return getDisco().getPkgs(distribution, versionNumber, latest, operatingSystem, LibCType.NONE, architecture, Bitness.NONE, archiveType, packageType, javafxBundled, /*directlyDownloadable*/ true, ReleaseStatus.NONE, TermOfSupport.NONE, Scope.PUBLIC);

Review Comment:
   No, I'll look at tidying up.



-- 
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] neilcsmith-net commented on a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850708089


##########
platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassFilesTest.java:
##########
@@ -120,4 +121,24 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
             }
         });
     }
+
+    private Map<String, Integer> calculateFileNameToVersion() {
+        Map<String, Integer> result = new HashMap<>();
+        for (Module module : Main.getModuleSystem().getManager().getModules()) {
+            for (Dependency dep : module.getDependencies()) {
+                if (dep.getType() == Dependency.TYPE_JAVA) {
+                    String javaVersion = dep.getVersion();
+                    if (javaVersion.startsWith("1.")) {
+                        break;

Review Comment:
   I meant `break`.  Shouldn't be more than one Java dependency in there? Should probably break later too.



-- 
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] neilcsmith-net commented on pull request #3974: Upgrade to Disco v2.

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

   Thanks @matthiasblaesing Particularly appreciate the second pair of eyes on the test. It will be our first module in the build that actually compiles with release 11 (as opposed to just having a JDK8+ dependency).  Travis errors on Groovy tests due to use of JDK 8 in build - pushed what is hopefully a fix for that.
   
   Yes, no exported API here - bumped the spec version to reflect using v2 of the client library and REST API.


-- 
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] neilcsmith-net commented on a diff in pull request #3974: Upgrade to Disco v2.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on code in PR #3974:
URL: https://github.com/apache/netbeans/pull/3974#discussion_r850707215


##########
java/java.disco/src/org/netbeans/modules/java/disco/SelectPackagePanel.java:
##########
@@ -177,6 +194,11 @@ protected void updateData(Distribution distribution, Integer featureVersion, Lat
                 .execute();
     }
 
+    @Override
+    protected void updateDistributions(List<Distribution> distros) {
+        super.updateDistributions(distros); //To change body of generated methods, choose Tools | Templates.

Review Comment:
   Oh $%$*&! I'll tidy this up too.



-- 
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] neilcsmith-net commented on pull request #3974: Upgrade to Disco v2.

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

   OK, failing commit validation because of the JDK 11 class file version.  Do we update the test to `major > 55` or is there a way we can special case modules with JDK 11 requirements?
   
   https://github.com/apache/netbeans/blob/master/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateClassFilesTest.java#L102


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