Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-52034] Update IGV to netbeans 20 and JDK 21 #8359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion compiler/mx.compiler/mx_graal_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ def run_netbeans_app(app_name, jdkhome, args=None, dist=None):
def igv(args):
"""run the Ideal Graph Visualizer"""
dist = 'IDEALGRAPHVISUALIZER-0_31-0A82D7A0D60_DIST'
run_netbeans_app('IdealGraphVisualizer', mx_compiler.jdk.home, args=args, dist=dist)
v11 = mx.VersionSpec("11")
v22 = mx.VersionSpec("22")
def _c1vJdkVersionCheck(version):
return v17 <= version <= v22
# Netbeans 20 officially supports 11, 17 and 20
jdkhome = mx.get_jdk(_c1vJdkVersionCheck, versionDescription='(JDK that is at least 11 and at most 21. This can be configured through EXTRA_JAVA_HOMES)', purpose="running IGV").home
run_netbeans_app('IdealGraphVisualizer', jdkhome, args=args, dist=dist)

def c1visualizer(args):
"""run the C1 Compiler Visualizer"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
javac.source=1.7
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@
</run-dependency>
</dependency>
</module-dependencies>
<test-dependencies>
<test-type>
<name>unit</name>
<test-dependency>
<code-name-base>org.netbeans.libs.junit4</code-name-base>
<compile-dependency/>
</test-dependency>
</test-type>
</test-dependencies>
<public-packages/>
</data>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
javac.source=1.7
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
package org.graalvm.visualizer.script.impl;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import static org.junit.Assert.assertNotNull;
import org.junit.AssumptionViolatedException;
import org.junit.rules.TestRule;
Expand All @@ -39,10 +42,18 @@ public class GraalSDKPresentRule implements TestRule {
private boolean checkGraal() {
try {
Class.forName("org.graalvm.polyglot.Engine");

final ScriptEngineManager manager = Scripting.createManager();
for (ScriptEngineFactory factory : manager.getEngineFactories()) {
final String name = factory.getEngineName();
System.err.println("Found " + name);
}

ScriptEngine js = Scripting.createManager().getEngineByName("GraalVM:js");
assertNotNull("Need GraalVM", js);
assertNotNull("Need GraalVM:js", js);
return true;
} catch (ClassNotFoundException ex) {
System.err.println(ex);
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
</dependency>
</module-dependencies>
<test-dependencies>
<test-type>
<name>unit</name>
<test-dependency>
<code-name-base>org.netbeans.libs.junit4</code-name-base>
<compile-dependency/>
</test-dependency>
</test-type>
<test-type>
<name>unit</name>
<test-dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.3.0</specification-version>
<specification-version>1.8.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>net.java.html.json</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.3.0</specification-version>
<specification-version>1.8.1</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=bdb96219
build.xml.data.CRC32=45e818a7
build.xml.script.CRC32=8a12d486
build.xml.stylesheet.CRC32=15ca8a54@2.74.1
build.xml.stylesheet.CRC32=15ca8a54@2.94
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=bdb96219
nbproject/build-impl.xml.data.CRC32=45e818a7
nbproject/build-impl.xml.script.CRC32=bac885a3
nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.74.1
nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.94
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.3.0</specification-version>
<specification-version>1.8.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>net.java.html.json</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.3.0</specification-version>
<specification-version>1.8.1</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
is.eager=true
javac.source=1.7
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenIDE-Module-Name=Visualizer UI Customizations
OpenIDE-Module-Display-Category=IGV
Services/AutoupdateType/distribution-update-provider.instance=NetBeans 12.5 distribution
URL_NBUpdateCenter=https://netbeans.apache.org/nb/updates/12.5/updates.xml.gz?{$netbeans.hash.code}
URL_NBPluginPortal=https://netbeans.apache.org/nb/plugins/12.5/catalog.xml.gz
Services/AutoupdateType/distribution-update-provider.instance=NetBeans 20.0 distribution
URL_NBUpdateCenter=https://netbeans.apache.org/nb/updates/20/updates.xml.gz?{$netbeans.hash.code}
URL_NBPluginPortal=https://netbeans.apache.org/nb/plugins/20/catalog.xml.gz
32 changes: 15 additions & 17 deletions visualizer/IdealGraphVisualizer/nbproject/platform.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ cluster.path=\
${nbplatform.active.dir}/platform:\
${nbplatform.active.dir}/webcommon
disabled.modules=\
bcpg,\
bcprov,\
com.google.guava,\
com.googlecode.javaewah.JavaEWAH,\
com.jcraft.jsch,\
com.jcraft.jzlib,\
net.java.html.boot.script,\
net.java.html.sound,\
org.apache.commons.httpclient,\
org.apache.commons.io,\
org.apache.commons.lang,\
org.apache.ws.commons.util,\
org.apache.xmlrpc,\
Expand All @@ -32,6 +29,9 @@ disabled.modules=\
org.eclipse.equinox.registry,\
org.eclipse.equinox.security,\
org.eclipse.jgit,\
org.eclipse.jgit.gpg.bc,\
org.eclipse.jgit.lfs,\
org.eclipse.jgit.ssh.jsch,\
org.eclipse.mylyn.bugzilla.core,\
org.eclipse.mylyn.commons.core,\
org.eclipse.mylyn.commons.net,\
Expand All @@ -50,7 +50,6 @@ disabled.modules=\
org.netbeans.core.osgi,\
org.netbeans.lib.uihandler,\
org.netbeans.lib.v8debug,\
org.netbeans.libs.bytelist,\
org.netbeans.libs.cglib,\
org.netbeans.libs.commons_compress,\
org.netbeans.libs.commons_net,\
Expand All @@ -62,11 +61,9 @@ disabled.modules=\
org.netbeans.libs.jsch.agentproxy,\
org.netbeans.libs.jsr223,\
org.netbeans.libs.jstestdriver,\
org.netbeans.libs.jvyamlb,\
org.netbeans.libs.nbi.ant,\
org.netbeans.libs.nbi.engine,\
org.netbeans.libs.plist,\
org.netbeans.libs.smack,\
org.netbeans.libs.springframework,\
org.netbeans.libs.svnClientAdapter,\
org.netbeans.libs.svnClientAdapter.javahl,\
Expand Down Expand Up @@ -123,19 +120,25 @@ disabled.modules=\
org.netbeans.modules.extexecution.impl,\
org.netbeans.modules.extexecution.process,\
org.netbeans.modules.extexecution.process.jdk9,\
org.netbeans.modules.findbugs.installer,\
org.netbeans.modules.form,\
org.netbeans.modules.form.kit,\
org.netbeans.modules.form.nb,\
org.netbeans.modules.form.refactoring,\
org.netbeans.modules.git,\
org.netbeans.modules.gsf.codecoverage,\
org.netbeans.modules.gradle,\
org.netbeans.modules.gradle.dists,\
org.netbeans.modules.gradle.editor,\
org.netbeans.modules.gradle.htmlui,\
org.netbeans.modules.gradle.java,\
org.netbeans.modules.gradle.java.coverage,\
org.netbeans.modules.gradle.kit,\
org.netbeans.modules.gradle.persistence,\
org.netbeans.modules.gradle.spring,\
org.netbeans.modules.gradle.test,\
org.netbeans.modules.gsf.codecoverage,\
org.netbeans.modules.html.angular,\
org.netbeans.modules.html.custom,\
org.netbeans.modules.html.knockout,\
org.netbeans.modules.html.ojet,\
org.netbeans.modules.html.validation,\
org.netbeans.modules.httpserver,\
org.netbeans.modules.hudson,\
Expand All @@ -160,6 +163,7 @@ disabled.modules=\
org.netbeans.modules.j2ee.persistence,\
org.netbeans.modules.j2ee.persistence.kit,\
org.netbeans.modules.janitor,\
org.netbeans.modules.java.disco,\
org.netbeans.modules.java.examples,\
org.netbeans.modules.java.freeform,\
org.netbeans.modules.java.graph,\
Expand Down Expand Up @@ -188,8 +192,6 @@ disabled.modules=\
org.netbeans.modules.javascript.nodejs,\
org.netbeans.modules.javascript.v8debug,\
org.netbeans.modules.javascript.v8debug.ui,\
org.netbeans.modules.javascript2.debug,\
org.netbeans.modules.javascript2.debug.ui,\
org.netbeans.modules.javascript2.extdoc,\
org.netbeans.modules.javascript2.extjs,\
org.netbeans.modules.javascript2.jade,\
Expand All @@ -207,23 +209,23 @@ disabled.modules=\
org.netbeans.modules.junit.ant.ui,\
org.netbeans.modules.keyring.fallback,\
org.netbeans.modules.keyring.impl,\
org.netbeans.modules.ko4j.debugging,\
org.netbeans.modules.kotlin.editor,\
org.netbeans.modules.languages,\
org.netbeans.modules.languages.apacheconf,\
org.netbeans.modules.languages.diff,\
org.netbeans.modules.languages.ini,\
org.netbeans.modules.languages.manifest,\
org.netbeans.modules.languages.yaml,\
org.netbeans.modules.libs.gradle,\
org.netbeans.modules.localhistory,\
org.netbeans.modules.localtasks,\
org.netbeans.modules.libs.gradle,\
org.netbeans.modules.lsp.client,\
org.netbeans.modules.markdown,\
org.netbeans.modules.maven.checkstyle,\
org.netbeans.modules.maven.coverage,\
org.netbeans.modules.maven.grammar,\
org.netbeans.modules.maven.graph,\
org.netbeans.modules.maven.htmlui,\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you enabling this module?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which module do you mean? I got complaints in the libraries panel and tried to make them go away. I would have sworn I disabled all the gradle stuff not enabled more. I take a look. I don't think it's related to the problem I'm having though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry my brain just caught up with the fact that this is an exclusion list so - means adding. I didn't explicitly add org.netbeans.modules.maven.htmlui so it must have been auto enabled. I'll do another pass over this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run the tests and yes, there is a problem with net.java.html & co. dependencies. I've never seen it myself. I don't know what is wrong off-hand. Debugging is needed - I'd ask some NetBeans experts like Sváťa for help.

org.netbeans.modules.maven.kit,\
org.netbeans.modules.maven.osgi,\
org.netbeans.modules.maven.persistence,\
Expand All @@ -234,11 +236,8 @@ disabled.modules=\
org.netbeans.modules.mercurial,\
org.netbeans.modules.mylyn.util,\
org.netbeans.modules.nashorn.execution,\
org.netbeans.modules.nbjunit,\
org.netbeans.modules.netserver,\
org.netbeans.modules.parsing.ui,\
org.netbeans.modules.performance,\
org.netbeans.modules.performance.java,\
org.netbeans.modules.print.editor,\
org.netbeans.modules.project.ant.compat8,\
org.netbeans.modules.projectimport.eclipse.core,\
Expand Down Expand Up @@ -324,7 +323,6 @@ disabled.modules=\
org.openide.execution.compat8,\
org.openide.filesystems.compat8,\
org.openide.options,\
org.openide.util.enumerations,\
org.openidex.util,\
slf4j.api,\
slf4j.jdk14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ project.org.graalvm.visualizer.upgrader=Upgrade

# Disable assertions for RequestProcessor to prevent annoying messages in case
# of multiple SceneAnimator update tasks in the default RequestProcessor.
run.args.extra = -J-XX:+IgnoreUnrecognizedVMOptions -J-Dsun.awt.disablegrab=true -J-server -J-da:org.openide.util.RequestProcessor -J-Xms2g -J-Xmx8g -J-Djava.lang.Integer.IntegerCache.high=200000
run.args.extra = -J-XX:+IgnoreUnrecognizedVMOptions -J-Dsun.awt.disablegrab=true -J-server -J-da:org.openide.util.RequestProcessor -J-Xms2g -J-Xmx8g -J-Djava.lang.Integer.IntegerCache.high=200000 -J--add-opens=java.base/java.net=ALL-UNNAMED
debug.args.extra = -J-server -J-da:org.openide.util.RequestProcessor
4 changes: 2 additions & 2 deletions visualizer/mx.visualizer/mx_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def clean(self, forBuild=False):

def run_ant(args, resolve=True, **kwargs):
# download the bundle using mx
platform_lib = mx.library('NETBEANS_14').get_path(resolve=resolve)
platform_lib = mx.library('NETBEANS_20').get_path(resolve=resolve)

# override the download URL to ensure it's taken from mx
return mx.run(['ant', '-Dide.dist.url=file:' + platform_lib] + args, **kwargs)
Expand Down Expand Up @@ -216,7 +216,7 @@ def test(args):
Single arguments is used as test java class in IGV
"""
run_ant(['patch-test', '-silent'], nonZeroIsFatal=True, cwd=igvDir)
add = ['-Dtest.run.args=-ea', '-Djava.awt.headless=true']
add = ['-Dtest.run.args=-ea --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED', '-Djava.awt.headless=true']
if len(args) == 1:
add += ['-Dtest.includes=**/*' + args[0] + '.class']
elif len(args) != 0:
Expand Down
6 changes: 3 additions & 3 deletions visualizer/mx.visualizer/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
"license" : "Apache-2.0"
},

"NETBEANS_14" : {
"digest" : "sha512:004b943a2542bd98784a3821411da3f0b048b9b101cc4699a96b1bf7789c654f4ad6c73a75d51a9cb0f436c421ce32baa0ad440efe461bd3e6a8e5e8e927f5c6",
"urls" : ["https://archive.apache.org/dist/netbeans/netbeans/14/netbeans-14-bin.zip"],
"NETBEANS_20" : {
"digest" : "sha512:59eb2b0e7887f0d962d180c4004a81cf752f12a2b9456c59417daf90a312877f697500580c53566a220bde2a49df2b95ba1e4dedb4cf59b49bdacdc47c98745f",
"urls" : ["https://archive.apache.org/dist/netbeans/netbeans/20/netbeans-20-bin.zip"],
},
},

Expand Down