[前][次][番号順一覧][スレッド一覧]

ruby-changes:69646

From: Yusuke <ko1@a...>
Date: Tue, 9 Nov 2021 03:33:05 +0900 (JST)
Subject: [ruby-changes:69646] efe7e6e949 (master): Bundle rbs 1.7.0.beta.5

https://git.ruby-lang.org/ruby.git/commit/?id=efe7e6e949

From efe7e6e949cc6137f2c918522f866cf6b99309ce Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Thu, 28 Oct 2021 15:49:55 +0900
Subject: Bundle rbs 1.7.0.beta.5

---
 gems/bundled_gems                              | 2 +-
 tool/dummy-rake-compiler/rake/extensiontask.rb | 9 +++++++++
 tool/test-bundled-gems.rb                      | 9 +++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 tool/dummy-rake-compiler/rake/extensiontask.rb

diff --git a/gems/bundled_gems b/gems/bundled_gems
index 2a0fba615da..4be5e27141f 100644
--- a/gems/bundled_gems
+++ b/gems/bundled_gems
@@ -11,6 +11,6 @@ net-pop 0.1.1 https://github.com/ruby/net-pop https://github.com/ruby/ruby/blob/trunk/gems/bundled_gems#L11
 net-smtp 0.3.0 https://github.com/ruby/net-smtp
 matrix 0.4.2 https://github.com/ruby/matrix
 prime 0.1.2 https://github.com/ruby/prime
-rbs 1.6.2 https://github.com/ruby/rbs
+rbs 1.7.0.beta.5 https://github.com/ruby/rbs
 typeprof 0.20.2 https://github.com/ruby/typeprof
 debug 1.3.4 https://github.com/ruby/debug
diff --git a/tool/dummy-rake-compiler/rake/extensiontask.rb b/tool/dummy-rake-compiler/rake/extensiontask.rb
new file mode 100644
index 00000000000..62b7ff8018b
--- /dev/null
+++ b/tool/dummy-rake-compiler/rake/extensiontask.rb
@@ -0,0 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/tool/dummy-rake-compiler/rake/extensiontask.rb#L1
+module Rake
+  class ExtensionTask < TaskLib
+    def initialize(...)
+      task :compile do
+        puts "Dummy `compile` task defined in #{__FILE__}"
+      end
+    end
+  end
+end
diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb
index ef491f9db4b..d9192f1bb96 100644
--- a/tool/test-bundled-gems.rb
+++ b/tool/test-bundled-gems.rb
@@ -9,6 +9,7 @@ allowed_failures = allowed_failures.split(',').reject(&:empty?) https://github.com/ruby/ruby/blob/trunk/tool/test-bundled-gems.rb#L9
 
 rake = File.realpath("../../.bundle/bin/rake", __FILE__)
 gem_dir = File.realpath('../../gems', __FILE__)
+dummy_rake_compiler_dir = File.realpath('../dummy-rake-compiler', __FILE__)
 exit_code = 0
 ruby = ENV['RUBY'] || RbConfig.ruby
 failed = []
@@ -33,6 +34,14 @@ File.foreach("#{gem_dir}/bundled_gems") do |line| https://github.com/ruby/ruby/blob/trunk/tool/test-bundled-gems.rb#L34
     test_command << " stdlib_test validate"
 
     first_timeout *= 3
+
+    # copied from debug gem
+    build_dir = 'ext/-test-/gems/rbs'
+    FileUtils.mkdir_p(build_dir)
+    extconf_path = File.expand_path('../../gems/src/rbs/ext/rbs_extension/extconf.rb', __FILE__)
+    system("#{ruby} -C #{build_dir} #{extconf_path}") or raise
+    system("cd #{build_dir} && make extout=../../../../.ext libdir=../../../..") or raise
+    ENV["RUBYLIB"] = [File.expand_path(dummy_rake_compiler_dir), File.expand_path(build_dir), ENV.fetch("RUBYLIB", nil)].compact.join(":")
   end
 
   if gem == "minitest"
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]