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

Tp/ruby 3.4 spike #1932

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
13 changes: 13 additions & 0 deletions config/patches/ruby/ruby-faster-load_34.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/load.c b/load.c
index a1729c2ba1..70390fb826 100644
--- a/load.c
+++ b/load.c
@@ -770,7 +770,7 @@ load_iseq_eval(rb_execution_context_t *ec, VALUE fname)
ast = rb_ruby_ast_data_get(ast_value);

iseq = rb_iseq_new_top(ast_value, rb_fstring_lit("<top (required)>"),
- fname, realpath_internal_cached(realpath_map, fname), NULL);
+ fname, fname, NULL);
rb_ast_dispose(ast);
}

19 changes: 9 additions & 10 deletions config/software/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
dependency "ncurses" if freebsd?

# version_list: url=https://cache.ruby-lang.org/pub/ruby/ filter=*.tar.gz
version("3.4.0-preview1") { source sha256: "1a3c322e90cb22e5fba0b5d257bb2be9988affa3867eba7642ed981fdde895bb" }
version("3.3.1") { source sha256: "8dc2af2802cc700cd182d5430726388ccf885b3f0a14fcd6a0f21ff249c9aa99" }
version("3.3.0") { source sha256: "96518814d9832bece92a85415a819d4893b307db5921ae1f0f751a9a89a56b7d" }
version("3.2.2") { source sha256: "96c57558871a6748de5bc9f274e93f4b5aad06cd8f37befa0e8d94e7b8a423bc" }
Expand Down Expand Up @@ -213,16 +214,14 @@
# it is unclear why or if it is necessary (hand crafted tests designed to try to
# abuse it all succeeded after this test).
#
if version.satisfies?("~> 2.6.0")
patch source: "ruby-faster-load_26.patch", plevel: 1, env: patch_env
end
if version.satisfies?(">=3.3")
patch source: "ruby-faster-load_33.patch", plevel: 1, env: patch_env
else
if version.satisfies?(">= 2.7")
patch source: "ruby-faster-load_27.patch", plevel: 1, env: patch_env
end
end

patch_file = "ruby-faster-load_26.patch" if version.satisfies?("~> 2.6.0")
patch_file = "ruby-faster-load_27.patch" if version.satisfies?(">= 2.7.0", "< 3.3.0")
patch_file = "ruby-faster-load_33.patch" if version.satisfies?("~> 3.3.0")
patch_file = "ruby-faster-load_34.patch" if version =~ /3.4.0/ # because preview releases!
patch source: patch_file, plevel: 1, env: patch_env unless patch_file.nil?


if freebsd? && version.satisfies?("~> 3.0.3")
patch source: "ruby-3.0.3-freebsd_13.patch", plevel: 1, env: patch_env
end
Expand Down