Skip to content

Commit 4018b86

Browse files
committed
[GR-48041] Prepare 23.1
PullRequest: truffleruby/3961
2 parents c3400a8 + 62ee5b2 commit 4018b86

File tree

71 files changed

+1794
-3089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1794
-3089
lines changed

.gitattributes

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Merge options
2-
3-
/CHANGELOG.md merge=union
4-
51
# Rules for GitHub's Linguist language-classification system. We're abusing the
62
# 'vendored' attribute to exclude files as a lot of this isn't really vendored,
73
# and a whole lot of actually vendored code isn't listed! What we want to do is
@@ -28,7 +24,8 @@
2824
/src/main/c/truffleposix/Makefile linguist-vendored
2925
/lib/gems/gems/*/bin/setup linguist-vendored
3026
/lib/truffle/post_install_hook.sh linguist-vendored
31-
/src/test/* linguist-vendored
27+
/src/test-embedding/* linguist-vendored
28+
/src/test-internal/* linguist-vendored
3229
/src/processor/* linguist-vendored
3330

3431
# Generated code

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AllCops:
1717
- 'lib/truffle/socket/mri.rb' # taken from MRI
1818
- 'lib/truffle/ffi/**/*.rb' # taken from FFI gem
1919
- 'src/main/ruby/truffleruby/core/truffle/ffi/pointer_extra.rb' # taken from FFI gem
20-
- 'src/test/ruby/types.rb' # deliberately strange code for debugging purposes
20+
- 'src/test-internal/ruby/types.rb' # deliberately strange code for debugging purposes
2121
- 'src/tck/ruby/lexical-context.rb' # deliberately strange code for debugging purposes
2222

2323
# Type 'Layout' (166):

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Performance:
4949

5050
Changes:
5151

52+
* The TruffleRuby `ScriptEngine` implementation is removed in favor of the generic [ScriptEngine](https://github.com/oracle/graal/blob/master/docs/reference-manual/embedding/embed-languages.md#compatibility-with-jsr-223-scriptengine) in GraalVM docs.
5253

5354
Memory Footprint:
5455

ci.jsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ local part_definitions = {
211211
# Same as in mx.truffleruby/native-host-inlining
212212
mx_options+:: [
213213
"--extra-image-builder-argument=env.EXTRA_IMAGE_BUILDER_ARGUMENTS",
214+
"--extra-image-builder-argument=rubyvm:-H:+UnlockExperimentalVMOptions",
214215
"--extra-image-builder-argument=rubyvm:-H:Log=HostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase",
215216
"--extra-image-builder-argument=rubyvm:-H:+TruffleHostInliningPrintExplored",
217+
"--extra-image-builder-argument=rubyvm:-H:-UnlockExperimentalVMOptions",
216218
"--extra-image-builder-argument=rubyvm:-Dgraal.LogFile=host-inlining.txt",
217219
],
218220
environment+: {

common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "6.41.0",
7+
"mx_version": "6.42.0",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {

doc/contributor/native-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ the Native Image version of TruffleRuby using a tool distributed as part of Graa
8484
the Java version of TruffleRuby from GraalVM.
8585

8686
```bash
87-
native-image -H:Name=native-ruby --language:ruby
87+
native-image -o native-ruby --language:ruby
8888
```
8989

9090
`native-ruby` is the output file name.

doc/contributor/using-eclipse.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ We can now import the projects:
3737
* Select this repository as root directory
3838
* Click `Finish`
3939

40-
There should be now 4 projects in your workspace:
41-
* `truffleruby`
42-
* `truffleruby-test`
43-
* `TRUFFLERUBY-TEST.dist`
44-
* `TRUFFLERUBY.dist`
40+
There should be now some projects in your workspace, like `truffleruby` and `TRUFFLERUBY.dist`.
4541

4642
## Advanced Setup
4743

doc/user/jruby-migration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ The standalone distribution does not allow for Java interoperability.
2121

2222
JRuby supports many different ways to embed Ruby in Java, including JSR 223 (also know as `javax.script`), the Bean Scripting Framework (BSF), JRuby Embed (also known as Red Bridge), and the JRuby direct embedding API.
2323

24-
Thes best way to embed TruffleRuby is to use the Polyglot API, which is part of GraalVM.
24+
The best way to embed TruffleRuby is to use the Polyglot API, which is part of GraalVM.
2525
The API is different because it is designed to support many languages, not just Ruby.
2626

2727
TruffleRuby also supports JSR 223, compatible with JRuby, to make it easier to run legacy JRuby code.
28+
See [this documentation](https://github.com/oracle/graal/blob/master/docs/reference-manual/embedding/embed-languages.md#compatibility-with-jsr-223-scriptengine) for how to use it.
2829

2930
You will need to use GraalVM to use both of these APIs.
3031

lib/cext/ABI_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
23.1.0

mx.truffleruby/mx_truffleruby.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def contents(self, result):
119119
'--disable-gems',
120120
'--disable-rubyopt',
121121
]
122-
command = [jdk.java] + jvm_args + [main_class] + ruby_options + ['"$@"']
122+
command = [jdk.java] + jvm_args + ['-m', 'org.graalvm.ruby.launcher/' + main_class] + ruby_options + ['"$@"']
123123
return "#!/usr/bin/env bash\n" + "exec " + " ".join(command) + "\n"
124124

125125

@@ -143,14 +143,14 @@ def build_truffleruby(args):
143143

144144
def ruby_check_heap_dump(input_args, out=None):
145145
print("mx ruby_check_heap_dump " + " ".join(input_args))
146-
dists = ['TRUFFLERUBY', 'TRUFFLE_NFI', 'SULONG_NATIVE', 'TRUFFLERUBY-TEST']
146+
dists = ['TRUFFLERUBY', 'TRUFFLE_NFI', 'SULONG_NATIVE', 'TRUFFLERUBY-TEST-INTERNAL']
147147
mx.command_function('build')(['--dependencies', ','.join(dists)])
148148
args = input_args
149149
args.insert(0, "--experimental-options")
150150
vm_args, truffleruby_args = mx.extract_VM_args(args, useDoubleDash=True, defaultAllVMArgs=False)
151151
vm_args += mx.get_runtime_jvm_args(dists)
152152
# vm_args.append("-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y")
153-
vm_args.append("org.truffleruby.LeakTest")
153+
vm_args.append("org.truffleruby.test.internal.LeakTest")
154154
out = mx.OutputCapture() if out is None else out
155155
retval = mx.run_java(vm_args + truffleruby_args, jdk=jdk, nonZeroIsFatal=False, out=out)
156156
if retval == 0:
@@ -273,9 +273,6 @@ def verify_ci(args):
273273
'truffleruby:JCODINGS',
274274
'truffleruby:JONI',
275275
],
276-
boot_jars=[
277-
'truffleruby:TRUFFLERUBY-SERVICES'
278-
],
279276
support_distributions=[
280277
'truffleruby:TRUFFLERUBY_GRAALVM_SUPPORT',
281278
'truffleruby:TRUFFLERUBY_GRAALVM_SUPPORT_NO_NI_RESOURCES',
@@ -301,9 +298,7 @@ def verify_ci(args):
301298
main_class='org.truffleruby.launcher.RubyLauncher',
302299
build_args=[
303300
'-J-Xmx6g', # Set Xmx to use a reliable amount of memory
304-
'-H:+DumpThreadStacksOnSignal',
305301
'-H:+DetectUserDirectoriesInImageHeap',
306-
'-H:+TruffleCheckBlockListMethods'
307302
],
308303
build_args_enterprise=[
309304
'-J-Xmx7g', # Set Xmx to use a reliable amount of memory

0 commit comments

Comments
 (0)