Skip to content

Commit 6738e1d

Browse files
eregonandrykonchin
authored andcommitted
[GR-47432] Use the Maven Downloader as a jar
PullRequest: truffleruby/3993 (cherry picked from commit 260d07b)
1 parent 3555c75 commit 6738e1d

File tree

12 files changed

+56
-25
lines changed

12 files changed

+56
-25
lines changed

mx.truffleruby/env_files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Here is how the various env files relate to each other:
22
* `jvm`
33
* `jvm-ce`: + GraalVM Community Compiler
4-
* `jvm-ce-ntl`: + native toolchain launchers + `truffleruby-polyglot-get`
4+
* `jvm-ce-ntl`: + native toolchain launchers
55
* `jvm-ce-libgraal`: + libgraal
66
* `native`: + librubyvm + `Truffle Macro`
77
* `native-host-inlining`: + `TruffleHostInliningPrintExplored`, - native toolchain launchers
88
* `jvm-ee`: + Oracle GraalVM Compiler + `Truffle enterprise`
9-
* `jvm-ee-ntl`: + native toolchain launchers + `truffleruby-polyglot-get`
9+
* `jvm-ee-ntl`: + native toolchain launchers
1010
* `jvm-ee-libgraal`: + libgraal
1111
* `native-ee`: + librubyvm + `Truffle Macro Enterprise` + Native Image G1
1212
* `native-ee-aux`: + `AuxiliaryEngineCache`, - Native Image G1 (currently incompatible)

mx.truffleruby/jvm-ce-libgraal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM,LibGraal
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get,lib:jvmcicompiler
4+
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler
55
# To also create the standalone
66
INSTALLABLES=TruffleRuby
77
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ce-ntl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get
4+
NATIVE_IMAGES=suite:sulong
55
# To also create the standalone
66
INSTALLABLES=TruffleRuby
77
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ee-libgraal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,LibGraal Enterprise
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get,lib:jvmcicompiler
4+
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler
55
# To also create the standalone
66
INSTALLABLES=TruffleRuby
77
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ee-ntl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get
4+
NATIVE_IMAGES=suite:sulong
55
# To also create the standalone
66
INSTALLABLES=TruffleRuby
77
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/mx_truffleruby.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ def ruby_maven_deploy_public(args):
299299
library_configs=[
300300
mx_sdk_vm.LanguageLibraryConfig(
301301
destination='lib/<lib:rubyvm>',
302-
launchers=['bin/<exe:ruby>', 'bin/<exe:truffleruby>'],
303-
jar_distributions=['truffleruby:TRUFFLERUBY-LAUNCHER'],
302+
launchers=['bin/<exe:ruby>', 'bin/<exe:truffleruby>', 'bin/<exe:truffleruby-polyglot-get>'],
303+
jar_distributions=['truffleruby:TRUFFLERUBY-LAUNCHER', 'sdk:MAVEN_DOWNLOADER'],
304304
main_class='org.truffleruby.launcher.RubyLauncher',
305305
build_args=[
306306
'-H:+DetectUserDirectoriesInImageHeap',
@@ -314,17 +314,6 @@ def ruby_maven_deploy_public(args):
314314
]
315315
)
316316
],
317-
launcher_configs=[
318-
mx_sdk_vm.LauncherConfig(
319-
destination='bin/<exe:truffleruby-polyglot-get>',
320-
jar_distributions=['sdk:MAVEN_DOWNLOADER'],
321-
main_class='org.graalvm.maven.downloader.Main',
322-
build_args=[
323-
'-Dorg.graalvm.maven.downloader.relative_output_dir=../modules',
324-
f'-Dorg.graalvm.maven.downloader.default_version={mx.suite("sdk").release_version()}',
325-
],
326-
),
327-
],
328317
stability="experimental",
329318
post_install_msg="""
330319
IMPORTANT NOTE:

mx.truffleruby/native

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM,Truffle Macro
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get,lib:rubyvm
4+
NATIVE_IMAGES=suite:sulong,lib:rubyvm
55
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:-UnlockExperimentalVMOptions
66
GENERATE_DEBUGINFO=false
77
# To also create the standalone

mx.truffleruby/native-ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise,substratevm-enterprise-gcs
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,Truffle Macro Enterprise,suite:substratevm-enterprise-gcs
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get,lib:rubyvm
4+
NATIVE_IMAGES=suite:sulong,lib:rubyvm
55
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:-UnlockExperimentalVMOptions
66
GENERATE_DEBUGINFO=false
77
# To also create the standalone

mx.truffleruby/native-ee-aux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,Truffle Macro Enterprise
4-
NATIVE_IMAGES=suite:sulong,truffleruby-polyglot-get,lib:rubyvm
4+
NATIVE_IMAGES=suite:sulong,lib:rubyvm
55
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:+UnlockExperimentalVMOptions rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:-UnlockExperimentalVMOptions rubyvm:-H:+AuxiliaryEngineCache rubyvm:-H:ReservedAuxiliaryImageBytes=1073741824
66
GENERATE_DEBUGINFO=false
77
NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE=true

mx.truffleruby/suite.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,13 @@
307307
"org.truffleruby.launcher": {
308308
"dir": "src/launcher",
309309
"sourceDirs": ["java"],
310-
"requires": ["java.logging"],
310+
"requires": ["java.logging", "java.xml"],
311311
"dependencies": [
312312
"truffleruby:TRUFFLERUBY-ANNOTATIONS",
313313
"truffleruby:TRUFFLERUBY-SHARED",
314314
"sdk:POLYGLOT",
315315
"sdk:LAUNCHER_COMMON",
316+
"sdk:MAVEN_DOWNLOADER",
316317
],
317318
"jacoco": "include",
318319
"javaCompliance": "17+",
@@ -566,6 +567,7 @@
566567
"truffleruby:TRUFFLERUBY-SHARED",
567568
"sdk:POLYGLOT",
568569
"sdk:LAUNCHER_COMMON",
570+
"sdk:MAVEN_DOWNLOADER",
569571
],
570572
"description": "TruffleRuby Launcher",
571573
"license": ["EPL-2.0"],

0 commit comments

Comments
 (0)