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

Commit

Permalink
Merge #7239
Browse files Browse the repository at this point in the history
7239: Fully remove compatibility guard r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that this code is untested and never run.

### What was your diagnosis of the problem?

My diagnosis was that we can remove it.

### What is your fix for the problem, implemented in this PR?

My fix is to remove the code.

### Why did you choose this fix out of the possible options?

I actually intented to remove this in #6983, but after a discussing it with @simi I decided to keep it (see #6983 (comment)). After a second though I think this is safe to remove and that the potential use case (that the latest bundler is allowed to be installed by a really really old rubygems that didn't support ruby version constraints) is not a problem. The `required_ruby_version` constraint landed in [rubygems 0.6, 15 years ago](rubygems/rubygems@240a9d3).

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
  • Loading branch information
bundlerbot and deivid-rodriguez committed Jul 15, 2019
2 parents 53bc81e + 2a7a5da commit 36ce7cc
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 43 deletions.
2 changes: 0 additions & 2 deletions lib/bundler.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_relative "bundler/compatibility_guard"

require_relative "bundler/vendored_fileutils"
require "pathname"
require "rbconfig"
Expand Down
9 changes: 0 additions & 9 deletions lib/bundler/compatibility_guard.rb

This file was deleted.

2 changes: 0 additions & 2 deletions lib/bundler/inline.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_relative "compatibility_guard"

# Allows for declaring a Gemfile inline in a ruby script, optionally installing
# any gems that aren't already installed on the user's system.
#
Expand Down
2 changes: 0 additions & 2 deletions lib/bundler/shared_helpers.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_relative "compatibility_guard"

require "pathname"
require "rbconfig"
require "rubygems"
Expand Down
4 changes: 2 additions & 2 deletions spec/install/bundler_spec.rb
Expand Up @@ -134,7 +134,7 @@

simulate_bundler_version "99999999.99.1"

bundle! "check", :env => { "BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD" => "1" }
bundle! "check"
expect(out).to include("The Gemfile's dependencies are satisfied")
end

Expand All @@ -147,7 +147,7 @@

simulate_bundler_version "99999999.99.1"

bundle! "check", :env => { "BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD" => "1" }
bundle! "check"
expect(out).to include("The Gemfile's dependencies are satisfied")
end

Expand Down
2 changes: 0 additions & 2 deletions spec/lock/lockfile_spec.rb
Expand Up @@ -3,8 +3,6 @@
RSpec.describe "the lockfile format" do
include Bundler::GemHelpers

before { ENV["BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD"] = "TRUE" }

it "generates a simple lockfile for a single source, gem" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
Expand Down
16 changes: 0 additions & 16 deletions spec/other/compatibility_guard_spec.rb

This file was deleted.

8 changes: 0 additions & 8 deletions spec/support/hax.rb
Expand Up @@ -59,11 +59,3 @@ class Object
end
end
end

if ENV["BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD"]
$LOADED_FEATURES << File.expand_path("../../../bundler/compatibility_guard.rb", __FILE__)
$LOADED_FEATURES << File.expand_path("../../../bundler/compatibility_guard", __FILE__)
$LOADED_FEATURES << "bundler/compatibility_guard.rb"
$LOADED_FEATURES << "bundler/compatibility_guard"
require "bundler/compatibility_guard"
end

0 comments on commit 36ce7cc

Please sign in to comment.