Skip to content

Commit d53fc01

Browse files
committed
[GR-18411] Update to latest Truffle and jt lint fast improvements.
PullRequest: truffleruby/1746
2 parents 1d51ed7 + 8a9c537 commit d53fc01

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

common.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.",
33

44
"jdks": {
5-
"oraclejdk8": {"name": "oraclejdk", "version": "8u251+08-jvmci-20.1-b02", "platformspecific": true },
6-
"openjdk8": {"name": "openjdk", "version": "8u252+09-jvmci-20.1-b02", "platformspecific": true },
7-
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u251+08-jvmci-20.1-b02-fastdebug", "platformspecific": true },
5+
"oraclejdk8": {"name": "oraclejdk", "version": "8u251+08-jvmci-20.2-b02", "platformspecific": true },
6+
"openjdk8": {"name": "openjdk", "version": "8u252+09-jvmci-20.2-b02", "platformspecific": true },
7+
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u251+08-jvmci-20.2-b02-fastdebug", "platformspecific": true },
88
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.6+8", "platformspecific": true },
99
"oraclejdk15": {"name": "oraclejdk", "version": "15+27", "platformspecific": true },
1010
"openjdk11": {"name": "openjdk", "version": "11.0.3+7", "platformspecific": true },
11-
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.7+10-jvmci-20.1-b02", "platformspecific": true },
12-
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.7+8-jvmci-20.1-b02", "platformspecific": true }
11+
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.7+10-jvmci-20.2-b02", "platformspecific": true },
12+
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.7+8-jvmci-20.2-b02", "platformspecific": true }
1313
},
1414

1515
"sulong": {

mx.truffleruby/suite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"name": "sulong",
99
"subdir": True,
10-
"version": "3eec42fde4bbdc2c4c36f1dcd44098e968c4feac",
10+
"version": "89aaf872689d47977073e0b87f7e12c8f28bc44e",
1111
"urls": [
1212
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
1313
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

tool/jt.rb

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ def gem_test_pack
14041404
# Unset variable set by the pre-commit hook which confuses git
14051405
env = { 'GIT_DIR' => nil, 'GIT_INDEX_FILE' => nil }
14061406

1407-
current = raw_sh(env, 'git', '-C', gem_test_pack, 'rev-parse', 'HEAD', capture: :out).chomp
1407+
current = raw_sh(env, 'git', '-C', gem_test_pack, 'rev-parse', 'HEAD', capture: :out, no_print_cmd: true).chomp
14081408
unless current == TRUFFLERUBY_GEM_TEST_PACK_VERSION
14091409
has_commit = raw_sh env, 'git', '-C', gem_test_pack, 'cat-file', '-e', TRUFFLERUBY_GEM_TEST_PACK_VERSION, continue_on_failure: true
14101410
unless has_commit
@@ -1841,7 +1841,7 @@ def install(name, *options)
18411841
dir_pattern = "#{dir}/openjdk1.8.0*#{jvmci_version}"
18421842
if Dir[dir_pattern].empty?
18431843
STDERR.puts download_message
1844-
jvmci_releases = 'https://github.com/graalvm/openjdk8-jvmci-builder/releases/download'
1844+
jvmci_releases = 'https://github.com/graalvm/graal-jvmci-8/releases/download'
18451845
filename = "openjdk-8u#{update}-#{jvmci_version}-#{mx_os}-amd64.tar.gz"
18461846
chdir(dir) do
18471847
raw_sh 'curl', '-L', "#{jvmci_releases}/#{jvmci_version}/#{filename}", '-o', filename
@@ -1879,6 +1879,8 @@ def install(name, *options)
18791879

18801880
eclipse_tar = eclipse_url.split('/').last
18811881
eclipse_name = File.basename(eclipse_tar, '.tar.gz')
1882+
eclipse_path = File.expand_path("../#{eclipse_name}/#{eclipse_exe}", TRUFFLERUBY_DIR)
1883+
return eclipse_path if File.exist?(eclipse_path)
18821884

18831885
dir = File.expand_path('..', TRUFFLERUBY_DIR)
18841886
chdir(dir) do
@@ -1896,7 +1898,7 @@ def install(name, *options)
18961898
end
18971899
end
18981900

1899-
File.expand_path("../#{eclipse_name}/#{eclipse_exe}", TRUFFLERUBY_DIR)
1901+
eclipse_path
19001902
end
19011903

19021904
def clone_enterprise
@@ -2078,11 +2080,7 @@ def rubocop(*args)
20782080

20792081
if gem_test_pack?
20802082
gem_home = "#{gem_test_pack}/rubocop-gems"
2081-
env = {
2082-
'GEM_HOME' => gem_home,
2083-
'GEM_PATH' => gem_home,
2084-
'PATH' => "#{gem_home}/bin:#{ENV['PATH']}"
2085-
}
2083+
env = { 'GEM_HOME' => gem_home, 'GEM_PATH' => gem_home }
20862084
sh env, 'ruby', "#{gem_home}/bin/rubocop", *args
20872085
else
20882086
sh 'rubocop', '_0.66.0_', *args
@@ -2381,8 +2379,18 @@ def format_specializations_arguments
23812379

23822380
def lint(*args)
23832381
fast = args.first == 'fast'
2384-
fast_exts_changed = fast ? `git diff --cached --name-only`.lines.map { |f| File.extname(f.strip) }.uniq : []
2385-
changed = ->(ext) { !fast or fast_exts_changed.include?(ext) }
2382+
if fast
2383+
changed_files = `git diff --cached --name-only` # Only staged files in the git index
2384+
if changed_files.empty? # post-commit hook
2385+
changed_files = `git diff --cached --name-only HEAD^`
2386+
end
2387+
raise 'Could not list changed files' if changed_files.empty?
2388+
exts_changed = changed_files.lines.map { |f| File.extname(f.strip) }.uniq
2389+
raise 'Could not list changed file extensions' if exts_changed.empty?
2390+
changed = -> ext { exts_changed.include?(ext) }
2391+
else
2392+
changed = -> _ext { true }
2393+
end
23862394

23872395
ENV['ECLIPSE_EXE'] ||= install_eclipse
23882396

0 commit comments

Comments
 (0)