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

ruby-changes:67243

From: Yusuke <ko1@a...>
Date: Wed, 25 Aug 2021 11:13:32 +0900 (JST)
Subject: [ruby-changes:67243] b44741f5dc (master): tool/test-bundled-gems.rb: Use the bundled RBS code to test TypeProf

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

From b44741f5dcb2903496832bffce09100e28356864 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Wed, 25 Aug 2021 02:49:49 +0900
Subject: tool/test-bundled-gems.rb: Use the bundled RBS code to test TypeProf

Formerly, TypeProf was tested with the latest RBS code during
`make test-bundled-gems`. However, when a new version of rbs is
released, and if it is incompatible with TypeProf,
`make test-bundled-gems` starts failing, which was annoying.

By this change, TypeProf is tested with the bundled version of RBS.
---
 common.mk                 | 2 +-
 gems/bundled_gems         | 2 +-
 tool/test-bundled-gems.rb | 5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/common.mk b/common.mk
index f42d1b6..7605f5f 100644
--- a/common.mk
+++ b/common.mk
@@ -1372,7 +1372,7 @@ no-test-bundled-gems-prepare: no-test-bundled-gems-precheck https://github.com/ruby/ruby/blob/trunk/common.mk#L1372
 yes-test-bundled-gems-prepare: yes-test-bundled-gems-precheck
 	$(ACTIONS_GROUP)
 	$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
-		--install-dir .bundle --conservative "bundler" "minitest:~> 5" "test-unit" "rake" "hoe" "yard" "pry" "packnga" "rexml" "json-schema" "rbs"
+		--install-dir .bundle --conservative "bundler" "minitest:~> 5" "test-unit" "rake" "hoe" "yard" "pry" "packnga" "rexml" "json-schema"
 	$(ACTIONS_ENDGROUP)
 
 PREPARE_BUNDLED_GEMS = test-bundled-gems-prepare
diff --git a/gems/bundled_gems b/gems/bundled_gems
index e6c704b..342c500 100644
--- a/gems/bundled_gems
+++ b/gems/bundled_gems
@@ -11,5 +11,5 @@ 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.2.1 https://github.com/ruby/net-smtp
 matrix 0.4.2 https://github.com/ruby/matrix
 prime 0.1.2 https://github.com/ruby/prime
-typeprof 0.15.2 https://github.com/ruby/typeprof
 rbs 1.5.1 https://github.com/ruby/rbs
+typeprof 0.15.2 https://github.com/ruby/typeprof
diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb
index d4c4533..6419ffa 100644
--- a/tool/test-bundled-gems.rb
+++ b/tool/test-bundled-gems.rb
@@ -20,6 +20,11 @@ File.foreach("#{gem_dir}/bundled_gems") do |line| https://github.com/ruby/ruby/blob/trunk/tool/test-bundled-gems.rb#L20
   test_command = "#{ruby} -C #{gem_dir}/src/#{gem} -Ilib #{rake} test"
   first_timeout = 600 # 10min
 
+  if gem == "typeprof"
+    raise "need to run rbs test suite before typeprof" unless File.readable?("#{gem_dir}/src/rbs/lib/rbs/parser.rb")
+    ENV["RUBYLIB"] = ["#{gem_dir}/src/rbs/lib", ENV.fetch("RUBYLIB", nil)].compact.join(":")
+  end
+
   if gem == "rbs"
     racc = File.realpath("../../libexec/racc", __FILE__)
     pid = Process.spawn("#{ruby} -C #{gem_dir}/src/#{gem} -Ilib #{racc} -v -o lib/rbs/parser.rb lib/rbs/parser.y")
-- 
cgit v1.1


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

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