Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion distribution/bin/enso
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ for opt in "$@"; do
done


exec java --module-path $COMP_PATH $EXTRA_OPTS $JAVA_OPTS -m org.enso.runtime/org.enso.EngineRunnerBootLoader "$@"
exec java --module-path $COMP_PATH --add-modules org.jline $EXTRA_OPTS $JAVA_OPTS -m org.enso.runtime/org.enso.EngineRunnerBootLoader "$@"
exit
2 changes: 1 addition & 1 deletion distribution/bin/enso.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ if /I %%A==--dump-graphs (
set EXTRA_OPTS=%EXTRA_OPTS% -Dgraal.Dump=Truffle:1
)
)
java --module-path %comp-dir% -Dpolyglot.compiler.IterativePartialEscape=true %EXTRA_OPTS% %JAVA_OPTS% -m org.enso.runtime/org.enso.EngineRunnerBootLoader %*
java --module-path %comp-dir% --add-modules org.jline -Dpolyglot.compiler.IterativePartialEscape=true %EXTRA_OPTS% %JAVA_OPTS% -m org.enso.runtime/org.enso.EngineRunnerBootLoader %*
Copy link
Member

Choose a reason for hiding this comment

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

It'd be better to avoid these add-modules modifications. If we are sure we want to use org.jline as a module in enso, then I'd suggest to modify module-info.java to require static org.jline. Then the standard JVM launcher shall pick the org.jline module up, when it is available.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Let's avoid --add-modules.

exit /B %errorlevel%
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public class ClassLoaderConstants {
* consistent.
*/
public static final List<String> CLASS_DELEGATION_PATTERNS =
List.of("org.graalvm", "java", "org.slf4j", "ch.qos");
List.of("org.graalvm", "java", "org.slf4j", "ch.qos", "org.jline");

public static final List<String> RESOURCE_DELEGATION_PATTERNS = List.of("org.slf4j", "ch.qos");
public static final List<String> RESOURCE_DELEGATION_PATTERNS = List.of("org.slf4j", "ch.qos", "org.jline");
/**
* Path to the {@code runner.jar} fat jar. This must not be on the system's module-path, because
* the JVM would not be able to boot.
Expand Down
4 changes: 3 additions & 1 deletion project/JPMSUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import java.nio.file.{
object JPMSUtils {
val slf4jVersion = "2.0.9"
val logbackClassicVersion = "1.3.7"
val jlineVersion = "3.23.0"

/** The list of modules that are included in the `component` directory in engine distribution.
* When invoking the `java` command, these modules need to be put on the module-path.
Expand All @@ -36,7 +37,8 @@ object JPMSUtils {
GraalVM.modules ++ GraalVM.langsPkgs ++ GraalVM.toolsPkgs ++ Seq(
"org.slf4j" % "slf4j-api" % slf4jVersion,
"ch.qos.logback" % "logback-classic" % logbackClassicVersion,
"ch.qos.logback" % "logback-core" % logbackClassicVersion
"ch.qos.logback" % "logback-core" % logbackClassicVersion,
"org.jline" % "jline" % jlineVersion
)

/** Filters modules by their IDs from the given classpath.
Expand Down