Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/sync_default_gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
name: Check out ruby/ruby
with:
fetch-depth: 999999 # Fetch all history to follow past renames. Not using 0 to avoid fetching tags/branches.
token: ${{ github.repository == 'ruby/ruby' && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}

- name: Increase rename limit
run: git config merge.renameLimit 999999

- name: Run tool/sync_default_gems.rb
id: sync
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:

- uses: ./.github/actions/slack
with:
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}${{ matrix.os }}
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: ${{ failure() }}

Expand Down
4 changes: 2 additions & 2 deletions lib/bundler/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def help(cli = nil)
end

def self.handle_no_command_error(command, has_namespace = $thor_runner)
if Bundler.feature_flag.plugins? && Bundler::Plugin.command?(command)
if Bundler.settings[:plugins] && Bundler::Plugin.command?(command)
return Bundler::Plugin.exec_command(command, ARGV[1..-1])
end

Expand Down Expand Up @@ -623,7 +623,7 @@ def pristine(*gems)
end
end

if Bundler.feature_flag.plugins?
if Bundler.settings[:plugins]
require_relative "cli/plugin"
desc "plugin", "Manage the bundler plugins"
subcommand "plugin", Plugin
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run

Bundler::Fetcher.disable_endpoint = options["full-index"]

Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.settings[:plugins]

# For install we want to enable strict validation
# (rather than some optimizations we perform at app runtime).
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/cli/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def run

Bundler.self_manager.update_bundler_and_restart_with_it_if_needed(update_bundler) if update_bundler

Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.settings[:plugins]

sources = Array(options[:source])
groups = Array(options[:group]).map(&:to_sym)
Expand Down
2 changes: 0 additions & 2 deletions lib/bundler/feature_flag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def self.settings_method(name, key, &default)

(1..10).each {|v| define_method("bundler_#{v}_mode?") { @major_version >= v } }

settings_flag(:global_gem_cache) { bundler_5_mode? }
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
settings_flag(:update_requires_all_flag) { bundler_5_mode? }

settings_option(:default_cli_command) { bundler_4_mode? ? :cli_help : :install }
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/inline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def gemfile(force_latest_compatible = false, options = {}, &gemfile)
Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"

Bundler::Plugin.gemfile_install(&gemfile) if Bundler.feature_flag.plugins?
Bundler::Plugin.gemfile_install(&gemfile) if Bundler.settings[:plugins]
builder = Bundler::Dsl.new
builder.instance_eval(&gemfile)

Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def add_hook(event, &block)
#
# @param [String] event
def hook(event, *args, &arg_blk)
return unless Bundler.feature_flag.plugins?
return unless Bundler.settings[:plugins]
unless Events.defined_event?(event)
raise ArgumentError, "Event '#{event}' not defined in Bundler::Plugin::Events"
end
Expand Down
6 changes: 1 addition & 5 deletions lib/bundler/rubygems_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,7 @@ def path_separator
end

def all_specs
SharedHelpers.major_deprecation 2, "Bundler.rubygems.all_specs has been removed in favor of Bundler.rubygems.installed_specs"

Gem::Specification.stubs.map do |stub|
StubSpecification.from_stub(stub)
end
SharedHelpers.feature_removed! "Bundler.rubygems.all_specs has been removed in favor of Bundler.rubygems.installed_specs"
end

def installed_specs
Expand Down
2 changes: 2 additions & 0 deletions lib/bundler/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class Settings
"BUNDLE_VERSION" => "lockfile",
"BUNDLE_LOCKFILE_CHECKSUMS" => true,
"BUNDLE_CACHE_ALL" => true,
"BUNDLE_PLUGINS" => true,
"BUNDLE_GLOBAL_GEM_CACHE" => false,
}.freeze

def initialize(root = nil)
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def path?
end

def extension_cache_path(spec)
return unless Bundler.feature_flag.global_gem_cache?
return unless Bundler.settings[:global_gem_cache]
return unless source_slug = extension_cache_slug(spec)
Bundler.user_cache.join(
"extensions", Gem::Platform.local.to_s, Bundler.ruby_scope,
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/source/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def load_spec_files
# across different projects, this cache will be shared.
# When using local git repos, this is set to the local repo.
def cache_path
@cache_path ||= if Bundler.feature_flag.global_gem_cache?
@cache_path ||= if Bundler.settings[:global_gem_cache]
Bundler.user_cache
else
Bundler.bundle_path.join("cache", "bundler")
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/source/rubygems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def download_gem(spec, download_cache_path, previous_spec = nil)
# @return [Pathname] The global cache path.
#
def download_cache_path(spec)
return unless Bundler.feature_flag.global_gem_cache?
return unless Bundler.settings[:global_gem_cache]
return unless remote = spec.remote
return unless cache_slug = remote.cache_slug

Expand Down
8 changes: 2 additions & 6 deletions lib/bundler/spec_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ def insecurely_materialized_specs
end

def -(other)
SharedHelpers.major_deprecation 2, "SpecSet#- has been removed with no replacement"

SpecSet.new(to_a - other.to_a)
SharedHelpers.feature_removed! "SpecSet#- has been removed with no replacement"
end

def find_by_name_and_platform(name, platform)
Expand Down Expand Up @@ -212,9 +210,7 @@ def what_required(spec)
end

def <<(spec)
SharedHelpers.major_deprecation 2, "SpecSet#<< has been removed with no replacement"

@specs << spec
SharedHelpers.feature_removed! "SpecSet#<< has been removed with no replacement"
end

def length
Expand Down