[#112457] [Ruby master Feature#19443] Cache `Process.pid` — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Issue #19443 has been reported by byroot (Jean Boussier).
16 messages
2023/02/16
[#112584] [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system — "normalperson (Eric Wong) via ruby-core" <ruby-core@...>
Issue #19465 has been reported by normalperson (Eric Wong).
9 messages
2023/02/25
[#112595] [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— "nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@...>
2023/02/25
SXNzdWUgIzE5NDY1IGhhcyBiZWVuIHVwZGF0ZWQgYnkgbm9idSAoTm9idXlvc2hpIE5ha2FkYSku
[#112613] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— Eric Wong via ruby-core <ruby-core@...>
2023/02/26
"nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@ml.ruby-lang.org> wrote:
[#112615] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— SHIBATA Hiroshi via ruby-core <ruby-core@...>
2023/02/27
MzUxMzZlMWU5YzIzMmFkN2EwMzQwN2I5OTJiMmU4NmI2ZGY0M2Y2MyBpcyBicm9rZW4gd2l0aCBg
[#112626] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— Eric Wong via ruby-core <ruby-core@...>
2023/02/28
```
[ruby-core:112443] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
From:
"hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>
Date:
2023-02-16 08:30:27 UTC
List:
ruby-core #112443
Issue #19158 has been updated by hsbt (Hiroshi SHIBATA).
This issue caused by https://git.ruby-lang.org/ruby.git/tree/tool/lib/bundl=
ed_gem.rb#n53.
```ruby
unless spec.extensions.empty?
spec.dependencies.clear
File.binwrite(File.join(dir, spec_dir, ".bundled.#{target}.gemspec"),=
spec.to_ruby)
end
```
We removed dependencies of debug gem for testing from gemspec temporally. A=
fter that, We re-use this modified gemspec for installation.
I confirmed to keep dependencies of debug gem with the following patch.
```
diff --git tool/rbinstall.rb tool/rbinstall.rb
index 85d05eff251..97e1a47fbae 100755
--- tool/rbinstall.rb
+++ tool/rbinstall.rb
@@ -1027,9 +1027,12 @@ def install_default_gem(dir, srcdir, bindir)
next if /^\s*(?:#|$)/ =3D~ name
next unless /^(\S+)\s+(\S+).*/ =3D~ name
gem_name =3D "#$1-#$2"
- path =3D "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
+ # Try to find the gemspec file for C ext gems
+ # ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec
+ # This gemspec keep the original dependencies
+ path =3D "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
unless File.exist?(path)
- path =3D "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
+ path =3D "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
unless File.exist?(path)
skipped[gem_name] =3D "gemspec not found"
next
--
```
=20
----------------------------------------
Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem
https://bugs.ruby-lang.org/issues/19158#change-101889
* Author: deivid (David Rodr=EDguez)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED
----------------------------------------
A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemsp=
ec` file that claims that debug-1.6.3 has no dependencies. This is incorrec=
t, and causes issues for Bundler as reported at https://github.com/rubygems=
/rubygems/issues/6082.
An issue workaround is to manually reinstall the gem with `gem install debu=
g:1.6.3`. That will reinstall the gem, including a correct gemspec file.
This is the file diff before and after reinstalling the gem
```diff
--- old.gemspec 2022-11-29 13:54:36
+++ /Users/deivid/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/specificati=
ons/debug-1.6.3.gemspec 2022-11-29 13:55:25
@@ -24,4 +24,16 @@
s.summary =3D "Debugging functionality for Ruby".freeze
=20
s.installed_by_version =3D "3.3.26" if s.respond_to? :installed_by_versi=
on
+
+ if s.respond_to? :specification_version then
+ s.specification_version =3D 4
+ end
+
+ if s.respond_to? :add_runtime_dependency then
+ s.add_runtime_dependency(%q<irb>.freeze, [">=3D 1.3.6"])
+ s.add_runtime_dependency(%q<reline>.freeze, [">=3D 0.3.1"])
+ else
+ s.add_dependency(%q<irb>.freeze, [">=3D 1.3.6"])
+ s.add_dependency(%q<reline>.freeze, [">=3D 0.3.1"])
+ end
end
```
In general, the files installed by ruby-core for bundled gems should be ide=
ntical to the ones installed by explicit `gem install`.
This issue is also present in master and I'm guessing it was introduced by =
https://github.com/ruby/ruby/commit/a2c66f52f402cb58372e271226f3341065561e5=
3 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc=
6d47082c21be8b9c74).
--=20
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-c=
ore.ml.ruby-lang.org/