Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-bootsnap for
openSUSE:Factory checked in at 2021-12-22 20:18:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-bootsnap (Old)
and /work/SRC/openSUSE:Factory/.rubygem-bootsnap.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-bootsnap"
Wed Dec 22 20:18:05 2021 rev:15 rq:942012 version:1.9.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-bootsnap/rubygem-bootsnap.changes
2021-10-11 15:32:31.178931772 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-bootsnap.new.2520/rubygem-bootsnap.changes
2021-12-22 20:19:08.455877263 +0100
@@ -1,0 +2,18 @@
+Tue Dec 21 22:47:57 UTC 2021 - Manuel Schnitzer <[email protected]>
+
+- updated to version 1.9.3
+
+ # 1.9.3
+
+ * Only disable the compile cache for source files impacted by [Ruby 3.0.3
[Bug 18250]](https://bugs.ruby-lang.org/issues/18250).
+ This should keep the performance loss to a minimum.
+
+ # 1.9.2
+
+ * Disable compile cache if [Ruby 3.0.3's ISeq cache
bug](https://bugs.ruby-lang.org/issues/18250) is detected.
+ AKA `iseq.rb:13 to_binary: wrong argument type false (expected Symbol)`
+ * Fix `Kernel.load` behavior: before `load 'a'` would load `a.rb` (and other
tried extensions) and
+ wouldn't load `a` unless `development_mode: true`, now only `a` would be
loaded and files with
+ extensions wouldn't be.
+
+-------------------------------------------------------------------
Old:
----
bootsnap-1.9.1.gem
New:
----
bootsnap-1.9.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-bootsnap.spec ++++++
--- /var/tmp/diff_new_pack.Kxz1VY/_old 2021-12-22 20:19:08.887877466 +0100
+++ /var/tmp/diff_new_pack.Kxz1VY/_new 2021-12-22 20:19:08.891877468 +0100
@@ -24,7 +24,7 @@
#
Name: rubygem-bootsnap
-Version: 1.9.1
+Version: 1.9.3
Release: 0
%define mod_name bootsnap
%define mod_full_name %{mod_name}-%{version}
++++++ bootsnap-1.9.1.gem -> bootsnap-1.9.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2021-09-20 12:01:17.000000000 +0200
+++ new/CHANGELOG.md 2021-11-24 17:30:11.000000000 +0100
@@ -1,5 +1,16 @@
# Unreleased
+# 1.9.3
+
+* Only disable the compile cache for source files impacted by [Ruby 3.0.3 [Bug
18250]](https://bugs.ruby-lang.org/issues/18250).
+ This should keep the performance loss to a minimum.
+
+# 1.9.2
+
+* Disable compile cache if [Ruby 3.0.3's ISeq cache
bug](https://bugs.ruby-lang.org/issues/18250) is detected.
+ AKA `iseq.rb:13 to_binary: wrong argument type false (expected Symbol)`
+* Fix `Kernel.load` behavior: before `load 'a'` would load `a.rb` (and other
tried extensions) and wouldn't load `a` unless `development_mode: true`, now
only `a` would be loaded and files with extensions wouldn't be.
+
# 1.9.1
* Removed a forgotten debug statement in JSON precompilation.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/bootsnap/compile_cache/iseq.rb
new/lib/bootsnap/compile_cache/iseq.rb
--- old/lib/bootsnap/compile_cache/iseq.rb 2021-09-20 12:01:17.000000000
+0200
+++ new/lib/bootsnap/compile_cache/iseq.rb 2021-11-24 17:30:11.000000000
+0100
@@ -9,10 +9,35 @@
attr_accessor(:cache_dir)
end
- def self.input_to_storage(_, path)
- RubyVM::InstructionSequence.compile_file(path).to_binary
- rescue SyntaxError
- raise(Uncompilable, 'syntax error')
+ has_ruby_bug_18250 = begin # https://bugs.ruby-lang.org/issues/18250
+ if defined? RubyVM::InstructionSequence
+ RubyVM::InstructionSequence.compile("def foo(*); ->{ super }; end;
def foo(**); ->{ super }; end").to_binary
+ end
+ false
+ rescue TypeError
+ true
+ end
+
+ if has_ruby_bug_18250
+ def self.input_to_storage(_, path)
+ iseq = begin
+ RubyVM::InstructionSequence.compile_file(path)
+ rescue SyntaxError
+ raise(Uncompilable, 'syntax error')
+ end
+
+ begin
+ iseq.to_binary
+ rescue TypeError
+ raise(Uncompilable, 'ruby bug #18250')
+ end
+ end
+ else
+ def self.input_to_storage(_, path)
+ RubyVM::InstructionSequence.compile_file(path).to_binary
+ rescue SyntaxError
+ raise(Uncompilable, 'syntax error')
+ end
end
def self.storage_to_output(binary, _args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/bootsnap/load_path_cache/cache.rb
new/lib/bootsnap/load_path_cache/cache.rb
--- old/lib/bootsnap/load_path_cache/cache.rb 2021-09-20 12:01:17.000000000
+0200
+++ new/lib/bootsnap/load_path_cache/cache.rb 2021-11-24 17:30:11.000000000
+0100
@@ -44,14 +44,20 @@
# Try to resolve this feature to an absolute path without traversing the
# loadpath.
- def find(feature)
+ def find(feature, try_extensions: true)
reinitialize if (@has_relative_paths && dir_changed?) || stale?
feature = feature.to_s.freeze
+
return feature if absolute_path?(feature)
- return expand_path(feature) if feature.start_with?('./')
+
+ if feature.start_with?('./', '../')
+ return try_extensions ? expand_path(feature) :
File.expand_path(feature).freeze
+ end
+
@mutex.synchronize do
- x = search_index(feature)
+ x = search_index(feature, try_extensions: try_extensions)
return x if x
+ return unless try_extensions
# Ruby has some built-in features that require lies about.
# For example, 'enumerator' is built in. If you require it, ruby
@@ -177,16 +183,24 @@
end
if DLEXT2
- def search_index(f)
- try_index(f + DOT_RB) || try_index(f + DLEXT) || try_index(f +
DLEXT2) || try_index(f)
+ def search_index(f, try_extensions: true)
+ if try_extensions
+ try_index(f + DOT_RB) || try_index(f + DLEXT) || try_index(f +
DLEXT2) || try_index(f)
+ else
+ try_index(f)
+ end
end
def maybe_append_extension(f)
try_ext(f + DOT_RB) || try_ext(f + DLEXT) || try_ext(f + DLEXT2) || f
end
else
- def search_index(f)
- try_index(f + DOT_RB) || try_index(f + DLEXT) || try_index(f)
+ def search_index(f, try_extensions: true)
+ if try_extensions
+ try_index(f + DOT_RB) || try_index(f + DLEXT) || try_index(f)
+ else
+ try_index(f)
+ end
end
def maybe_append_extension(f)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb
new/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb
--- old/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb 2021-09-20
12:01:17.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb 2021-11-24
17:30:11.000000000 +0100
@@ -56,25 +56,9 @@
alias_method(:load_without_bootsnap, :load)
def load(path, wrap = false)
- if (resolved = Bootsnap::LoadPathCache.load_path_cache.find(path))
- return load_without_bootsnap(resolved, wrap)
- end
-
- # load also allows relative paths from pwd even when not in $:
- if File.exist?(relative = File.expand_path(path).freeze)
- return load_without_bootsnap(relative, wrap)
- end
-
- raise(Bootsnap::LoadPathCache::CoreExt.make_load_error(path))
- rescue LoadError => e
- e.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
- raise(e)
- rescue Bootsnap::LoadPathCache::ReturnFalse
- false
- rescue Bootsnap::LoadPathCache::FallbackScan
- fallback = true
- ensure
- if fallback
+ if (resolved = Bootsnap::LoadPathCache.load_path_cache.find(path,
try_extensions: false))
+ load_without_bootsnap(resolved, wrap)
+ else
load_without_bootsnap(path, wrap)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/bootsnap/load_path_cache/loaded_features_index.rb
new/lib/bootsnap/load_path_cache/loaded_features_index.rb
--- old/lib/bootsnap/load_path_cache/loaded_features_index.rb 2021-09-20
12:01:17.000000000 +0200
+++ new/lib/bootsnap/load_path_cache/loaded_features_index.rb 2021-11-24
17:30:11.000000000 +0100
@@ -84,10 +84,18 @@
# entry.
def register(short, long = nil)
if long.nil?
- pat = %r{/#{Regexp.escape(short)}(\.[^/]+)?$}
len = $LOADED_FEATURES.size
ret = yield
- long = $LOADED_FEATURES[len..-1].detect { |feat| feat =~ pat }
+ long = $LOADED_FEATURES[len..-1].detect do |feat|
+ offset = 0
+ while offset = feat.index(short, offset)
+ if feat.index(".", offset + 1) && !feat.index("/", offset + 2)
+ break true
+ else
+ offset += 1
+ end
+ end
+ end
else
ret = yield
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/bootsnap/version.rb new/lib/bootsnap/version.rb
--- old/lib/bootsnap/version.rb 2021-09-20 12:01:17.000000000 +0200
+++ new/lib/bootsnap/version.rb 2021-11-24 17:30:11.000000000 +0100
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Bootsnap
- VERSION = "1.9.1"
+ VERSION = "1.9.3"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2021-09-20 12:01:17.000000000 +0200
+++ new/metadata 2021-11-24 17:30:11.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: bootsnap
version: !ruby/object:Gem::Version
- version: 1.9.1
+ version: 1.9.3
platform: ruby
authors:
- Burke Libbey
autorequire:
bindir: exe
cert_chain: []
-date: 2021-09-20 00:00:00.000000000 Z
+date: 2021-11-24 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: bundler