ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
@ 2022-11-29 12:57 deivid
  2022-11-30  1:46 ` [ruby-core:111077] " nagachika (Tomoyuki Chikanaga)
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: deivid @ 2022-11-29 12:57 UTC (permalink / raw)
  To: ruby-core

Issue #19158 has been reported by deivid (David Rodríguez).



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158



* Author: deivid (David Rodríguez)

* Status: Open

* Priority: Normal

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:111077] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
@ 2022-11-30  1:46 ` nagachika (Tomoyuki Chikanaga)
  2022-11-30  8:33 ` [ruby-core:111086] " deivid
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: nagachika (Tomoyuki Chikanaga) @ 2022-11-30  1:46 UTC (permalink / raw)
  To: ruby-core

Issue #19158 has been updated by nagachika (Tomoyuki Chikanaga).





Hello,

Thank you for the report.

nobu told me that the current master branch doesn't have the issue.

I will looking for the relevant commits and backport them.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-100336



* Author: deivid (David Rodríguez)

* Status: Open

* Priority: Normal

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:111086] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
  2022-11-30  1:46 ` [ruby-core:111077] " nagachika (Tomoyuki Chikanaga)
@ 2022-11-30  8:33 ` deivid
  2022-11-30 18:28 ` [ruby-core:111096] " deivid
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: deivid @ 2022-11-30  8:33 UTC (permalink / raw)
  To: ruby-core

Issue #19158 has been updated by deivid (David Rodríguez).





Just to clarify, the current master branch of Bundler is indeed not affected by this issue, but that's just "luck". I'm adding a spec on our side to make sure it stays like that, but the ruby-core issue is still there and I suspect it could bite us in other ways.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-100349



* Author: deivid (David Rodríguez)

* Status: Open

* Priority: Normal

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:111096] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
  2022-11-30  1:46 ` [ruby-core:111077] " nagachika (Tomoyuki Chikanaga)
  2022-11-30  8:33 ` [ruby-core:111086] " deivid
@ 2022-11-30 18:28 ` deivid
  2023-01-05  9:21 ` [ruby-core:111644] " hsbt (Hiroshi SHIBATA) via ruby-core
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: deivid @ 2022-11-30 18:28 UTC (permalink / raw)
  To: ruby-core

Issue #19158 has been updated by deivid (David Rodríguez).





Hi again @nagachika.



I was double checking this, because I thought you probably meant "master branch of Ruby" and not "master branch of Bundler". I assumed the bug is present in both the master branch of Ruby and ruby_3_1 because the suspicious commit is present in both branches, but I tried to reproduce this issue in both branches and I couldn't. The installed gemspec (after configure, make, make install) seems correct on both.



So I'm not sure why this is happening with Ruby 3.1.3 tarball.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-100361



* Author: deivid (David Rodríguez)

* Status: Open

* Priority: Normal

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:111644] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
                   ` (2 preceding siblings ...)
  2022-11-30 18:28 ` [ruby-core:111096] " deivid
@ 2023-01-05  9:21 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-02-15 19:24 ` [ruby-core:112437] " deivid via ruby-core
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-01-05  9:21 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19158 has been updated by hsbt (Hiroshi SHIBATA).





@deivid @nagachika did backport the installer toolchain like `rbinstall.rb` into `ruby_3_1` branch for releasing Ruby 3.1.3. Maybe, this issue contained its time.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-101026



* Author: deivid (David Rodríguez)

* Status: Assigned

* Priority: Normal

* Assignee: nagachika (Tomoyuki Chikanaga)

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:112437] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
                   ` (3 preceding siblings ...)
  2023-01-05  9:21 ` [ruby-core:111644] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-02-15 19:24 ` deivid via ruby-core
  2023-02-16  7:02 ` [ruby-core:112442] " hsbt (Hiroshi SHIBATA) via ruby-core
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: deivid via ruby-core @ 2023-02-15 19:24 UTC (permalink / raw)
  To: ruby-core; +Cc: deivid

Issue #19158 has been updated by deivid (David Rodríguez).





People are still hitting issues here due to an incorrect gemspec for the debug gem being shipped with Ruby 3.2.1 so I guess this is not yet fixed.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-101882



* Author: deivid (David Rodríguez)

* Status: Assigned

* Priority: Normal

* Assignee: nagachika (Tomoyuki Chikanaga)

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:112442] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
                   ` (4 preceding siblings ...)
  2023-02-15 19:24 ` [ruby-core:112437] " deivid via ruby-core
@ 2023-02-16  7:02 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-02-16  8:30 ` [ruby-core:112443] " hsbt (Hiroshi SHIBATA) via ruby-core
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-02-16  7:02 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19158 has been updated by hsbt (Hiroshi SHIBATA).



Assignee changed from nagachika (Tomoyuki Chikanaga) to hsbt (Hiroshi SHIBATA)

Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED to 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED



I can reproduce this issue with current master branch.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-101888



* Author: deivid (David Rodríguez)

* 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.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:112443] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
                   ` (5 preceding siblings ...)
  2023-02-16  7:02 ` [ruby-core:112442] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-02-16  8:30 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-02-22  7:11 ` [ruby-core:112530] " hsbt (Hiroshi SHIBATA) via ruby-core
  2023-02-23  3:48 ` [ruby-core:112545] " nagachika (Tomoyuki Chikanaga) via ruby-core
  8 siblings, 0 replies; 10+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-02-16  8:30 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19158 has been updated by hsbt (Hiroshi SHIBATA).





This issue caused by https://git.ruby-lang.org/ruby.git/tree/tool/lib/bundled_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. After 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*(?:#|$)/ =~ name

     next unless /^(\S+)\s+(\S+).*/ =~ name

     gem_name = "#$1-#$2"

-    path = "#{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 = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"

     unless File.exist?(path)

-      path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"

+      path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"

       unless File.exist?(path)

          skipped[gem_name] = "gemspec not found"

          next

--

```



 







----------------------------------------

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íguez)

* 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.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:112530] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
                   ` (6 preceding siblings ...)
  2023-02-16  8:30 ` [ruby-core:112443] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-02-22  7:11 ` hsbt (Hiroshi SHIBATA) via ruby-core
  2023-02-23  3:48 ` [ruby-core:112545] " nagachika (Tomoyuki Chikanaga) via ruby-core
  8 siblings, 0 replies; 10+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-02-22  7:11 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #19158 has been updated by hsbt (Hiroshi SHIBATA).



Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED, 3.2: REQUIRED



I submitted pull-requests for Ruby 3.1 and 3.2.



* [for Ruby 3.1](https://github.com/ruby/ruby/pull/7355)

* [for Ruby 3.2](https://github.com/ruby/ruby/pull/7356)



In my investigation, this issue only happened in-place build with ruby package. 



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-101979



* Author: deivid (David Rodríguez)

* Status: Assigned

* Priority: Normal

* Assignee: hsbt (Hiroshi SHIBATA)

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED, 3.2: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-core:112545] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem
  2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
                   ` (7 preceding siblings ...)
  2023-02-22  7:11 ` [ruby-core:112530] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-02-23  3:48 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  8 siblings, 0 replies; 10+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2023-02-23  3:48 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

Issue #19158 has been updated by nagachika (Tomoyuki Chikanaga).



Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE, 3.2: REQUIRED



Merged the pull request for ruby_3_1 https://github.com/ruby/ruby/pull/7355.



----------------------------------------

Bug #19158: Ruby 3.1.3 installs wrong gemspec for debug gem

https://bugs.ruby-lang.org/issues/19158#change-101990



* Author: deivid (David Rodríguez)

* Status: Closed

* Priority: Normal

* Assignee: hsbt (Hiroshi SHIBATA)

* ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE, 3.2: REQUIRED

----------------------------------------

A pristine installation of Ruby 3.1.3 shows an installed `debug-1.6.3.gemspec` file that claims that debug-1.6.3 has no dependencies. This is incorrect, 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 debug: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/specifications/debug-1.6.3.gemspec	2022-11-29 13:55:25

@@ -24,4 +24,16 @@

   s.summary = "Debugging functionality for Ruby".freeze

 

   s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version

+

+  if s.respond_to? :specification_version then

+    s.specification_version = 4

+  end

+

+  if s.respond_to? :add_runtime_dependency then

+    s.add_runtime_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_runtime_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  else

+    s.add_dependency(%q<irb>.freeze, [">= 1.3.6"])

+    s.add_dependency(%q<reline>.freeze, [">= 0.3.1"])

+  end

 end

```



In general, the files installed by ruby-core for bundled gems should be identical 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/a2c66f52f402cb58372e271226f3341065561e53 (backported at https://github.com/ruby/ruby/commit/2d26e45135af8b427d9ccc6d47082c21be8b9c74).







-- 

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-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-02-23  3:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 12:57 [ruby-core:111053] [Ruby master Bug#19158] Ruby 3.1.3 installs wrong gemspec for debug gem deivid
2022-11-30  1:46 ` [ruby-core:111077] " nagachika (Tomoyuki Chikanaga)
2022-11-30  8:33 ` [ruby-core:111086] " deivid
2022-11-30 18:28 ` [ruby-core:111096] " deivid
2023-01-05  9:21 ` [ruby-core:111644] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-02-15 19:24 ` [ruby-core:112437] " deivid via ruby-core
2023-02-16  7:02 ` [ruby-core:112442] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-02-16  8:30 ` [ruby-core:112443] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-02-22  7:11 ` [ruby-core:112530] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-02-23  3:48 ` [ruby-core:112545] " nagachika (Tomoyuki Chikanaga) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).