Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Remove version overwriting hacks #7062

Merged
6 commits merged into from May 12, 2019

Commits on May 12, 2019

  1. Add missing require

    Otherwise it could happen that support/hax defines Bundler::VERSION first,
    and then the real version file redefines it. Not at the moment due to
    the version overwriting hacks in our version.rb file, but those will be
    removed.
    deivid-rodriguez committed May 12, 2019
    Copy the full SHA
    b874d63 View commit details
    Browse the repository at this point in the history
  2. Setup rubyopt to require bundler absolutely

    This way, we will never leak to a different bundler copy.
    deivid-rodriguez committed May 12, 2019
    Copy the full SHA
    a5da088 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    d23a352 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    283363b View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    1628172 View commit details
    Browse the repository at this point in the history
  6. Remove version overriding stuff

    By doing this we avoid circular requires (`rubygems` requires `bundler` via
    `USE_GEMDEPS`, `bundler` requires `rubygems` when loading its own version), and
    also redefinition warnings when the `bundler.gemspec` is evaluated with
    `rubygems` already loaded (for example, when running `ruby setup.rb`
    from `rubygems` repo).
    
    But most importantly, we avoid leaking from a bundler installation to a
    different one, something quite common since bundler is a default gem.
    The previous hack meant acting like that didn't happen, but seems
    actually quite dangerous.
    
    We can do this due to the previous work of making all of bundler
    internal requires not rely on the LOAD_PATH, and thus making it
    impossible to leak to another copy of bundler.
    deivid-rodriguez committed May 12, 2019
    Copy the full SHA
    c675b59 View commit details
    Browse the repository at this point in the history