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

Upgrade to latest GraalJS version #5153

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,7 @@ dependencies {
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
"org.graalvm.sdk:graal-sdk:${graalVersion}",
"GraalJS",
"GraalJS",
"https://github.com/graalvm/graaljs",
"Universal Permissive License",
"https://github.com/graalvm/graaljs/blob/master/LICENSE",
"Server-side JavaScript evaluation"
)
)

BuildUtils.addExternalDependency(
project,
new ExternalDependency(
"org.graalvm.js:js:${graalVersion}",
"org.graalvm.polyglot:js-community:${graalVersion}",
"GraalJS",
"GraalJS",
"https://github.com/graalvm/graaljs",
Expand Down
18 changes: 10 additions & 8 deletions core/src/org/labkey/core/wiki/MarkdownServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ public class MarkdownServiceImpl implements MarkdownService

private static class PoolFactory implements KeyedPoolableObjectFactory<Map<Options, Boolean>, MarkdownInvocable>
{

public static final String POLYGLOT_ENGINE_WARN_INTERPRETER_ONLY = "polyglot.engine.WarnInterpreterOnly";

static
{
// Issue 47679 - suppress stdout logging from GraalJS about compilation mode, due to significant difficulties
// in getting the VM configured to use compilation mode
if (System.getProperty(POLYGLOT_ENGINE_WARN_INTERPRETER_ONLY) == null)
{
System.setProperty(POLYGLOT_ENGINE_WARN_INTERPRETER_ONLY, "false");
}
}

@Override
public MarkdownInvocable makeObject(Map<Options, Boolean> options) throws Exception
{
Expand All @@ -61,13 +70,6 @@ public MarkdownInvocable makeObject(Map<Options, Boolean> options) throws Except
if (null == svc)
throw new ConfigurationException("LabKeyScriptEngineManager service not found.");

// Issue 47679 - suppress stdout logging from Graal about compilation mode, due to significant difficulties
// in getting the VM configured to use compilation mode
if (System.getProperty(POLYGLOT_ENGINE_WARN_INTERPRETER_ONLY) == null)
{
System.setProperty(POLYGLOT_ENGINE_WARN_INTERPRETER_ONLY, "false");
}

ScriptEngine engine = svc.getEngineByName("graal.js");
if (null == engine)
throw new ConfigurationException("Graal.js engine not found");
Expand Down