Project

General

Profile

Bug #15582

default/bundler-1.17.2.gemspec has no file list

Added by mame (Yusuke Endoh) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
[ruby-core:91374]

Description

Ruby 2.6.1's prefix/lib/ruby/gems/2.6.0/specifications/default/bundler-1.17.2.gemspec seems wrong.

  s.files = ["bundler.rb".freeze, "exe/bundle".freeze, "exe/bundler".freeze]

It should have "bundler/setup.rb", "bundler/version.rb", etc.

This causes a trouble depending upon the order of require when a different version of bundler is installed:

$ gem list bundler

*** LOCAL GEMS ***

bundler (1.17.3, default: 1.17.2)

$ ruby -e 'require "bundler/version"; require "bundler"; p Bundler::VERSION'
"1.17.2"

$ ruby -e 'require "bundler"; require "bundler/version"; p Bundler::VERSION'
"1.17.3"

Files

15582-bundler-gemspec.patch (5.17 KB) 15582-bundler-gemspec.patch hsbt (Hiroshi SHIBATA), 02/01/2019 01:18 PM

Related issues

Has duplicate Ruby master - Bug #15586: Requiring `bundler/setup` gets wrong versionClosedActions
Has duplicate Ruby master - Bug #15622: Default version of Bundler incorrectly invoked when using binstubs Rejectedhsbt (Hiroshi SHIBATA)Actions

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

Thanks, I forgot to apply to move gemspec location for FileCollector of rbinstall.rb related r66913.

I attached the patch for this issue.

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

If you use rbenv and ruby-build, You can build 2.6.1 with this patch like this.

curl -sSL https://bugs.ruby-lang.org/attachments/download/7631/15582-bundler-gemspec.patch | rbenv install --patch 2.6.1 -f
#3

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r66984.


Fixed gemspec location of bundler.

FileCollector of rbinstall.rb requires location of gemspec under
the sub-direcotry with the same name as default gems.

I forgot to fix it with r66867.

[Bug #15582][ruby-core:91374]

#4

Updated by mame (Yusuke Endoh) over 1 year ago

  • Has duplicate Bug #15586: Requiring `bundler/setup` gets wrong version added
#5

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

  • Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED

Updated by mame (Yusuke Endoh) over 1 year ago

FYI: I've heard that we can work around this issue by gem update --system.

Updated by deivid (David Rodríguez) over 1 year ago

Yes, since rubygems 2.6.1 ships with rubygems 3.0.1, running gem update --system will update to the latest version (3.0.2) and force reinstallation of the default bundler gem.

However, I have noticed that other default gems suffer from this issue, for example the etc gem. In that case, a workaround is to reinstall the same version of the default gem, for example, gem install etc:1.0.1 --default.

Updated by naruse (Yui NARUSE) over 1 year ago

  • Backport changed from 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE

ruby_2_6 r67180 merged revision(s) 66984.

#9

Updated by hsbt (Hiroshi SHIBATA) over 1 year ago

  • Has duplicate Bug #15622: Default version of Bundler incorrectly invoked when using binstubs added

Updated by deivid (David Rodríguez) over 1 year ago

Hi hsbt (Hiroshi SHIBATA)!

I assumed this fix would also fix the incorrect file list for the etc gem's gemspec but I didn't try it to make sure and it looks like it didn't fix it actually. On the default ruby 2.6.2 release, the file list is ["etc.so", "ext/etc/extconf.rb"]. If I force reinstallation as a default gem, it becomes [".gitignore".freeze, ".travis.yml".freeze, "Gemfile".freeze, "LICENSE.txt".freeze, "README.md".freeze, "Rakefile".freeze, "bin/console".freeze, "bin/setup".freeze, "etc.gemspec".freeze, "ext/etc/etc.c".freeze, "ext/etc/extconf.rb".freeze, "ext/etc/mkconstants.rb".freeze, "test/etc/test_etc.rb".freeze].

This causes some spec failures on bundler's test suite.

Let me know if you want me to open a new ticket!

Thanks!

Also available in: Atom PDF