зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Fix error messages to not mention cached gems when they were not used
https://github.com/rubygems/rubygems/commit/5ce9a7ff17
This commit is contained in:
Родитель
744dd5a362
Коммит
eef125fd09
|
@ -50,6 +50,8 @@ module Bundler
|
|||
end
|
||||
|
||||
def cached!
|
||||
return unless File.exist?(cache_path)
|
||||
|
||||
return if @allow_cached
|
||||
|
||||
@specs = nil
|
||||
|
|
|
@ -1349,7 +1349,7 @@ RSpec.describe "bundle lock" do
|
|||
Because rails >= 7.0.4 depends on railties = 7.0.4
|
||||
and rails < 7.0.4 depends on railties = 7.0.3.1,
|
||||
railties = 7.0.3.1 OR = 7.0.4 is required.
|
||||
So, because railties = 7.0.3.1 OR = 7.0.4 could not be found in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally,
|
||||
So, because railties = 7.0.3.1 OR = 7.0.4 could not be found in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally,
|
||||
version solving has failed.
|
||||
ERR
|
||||
end
|
||||
|
@ -1460,7 +1460,7 @@ RSpec.describe "bundle lock" do
|
|||
Thus, rails >= 7.0.2.3, < 7.0.4 cannot be used.
|
||||
And because rails >= 7.0.4 depends on activemodel = 7.0.4,
|
||||
rails >= 7.0.2.3 requires activemodel = 7.0.4.
|
||||
So, because activemodel = 7.0.4 could not be found in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally
|
||||
So, because activemodel = 7.0.4 could not be found in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally
|
||||
and Gemfile depends on rails >= 7.0.2.3,
|
||||
version solving has failed.
|
||||
ERR
|
||||
|
|
|
@ -120,7 +120,7 @@ RSpec.describe "post bundle message" do
|
|||
gem "not-a-gem", :group => :development
|
||||
G
|
||||
expect(err).to include <<-EOS.strip
|
||||
Could not find gem 'not-a-gem' in rubygems repository #{file_uri_for(gem_repo1)}/, cached gems or installed locally.
|
||||
Could not find gem 'not-a-gem' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally.
|
||||
EOS
|
||||
end
|
||||
|
||||
|
|
|
@ -929,7 +929,7 @@ RSpec.describe "bundle install with git sources" do
|
|||
gem "has_submodule"
|
||||
end
|
||||
G
|
||||
expect(err).to match(%r{submodule >= 0 could not be found in rubygems repository #{file_uri_for(gem_repo1)}/, cached gems or installed locally})
|
||||
expect(err).to match(%r{submodule >= 0 could not be found in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally})
|
||||
|
||||
expect(the_bundle).not_to include_gems "has_submodule 1.0"
|
||||
end
|
||||
|
|
|
@ -520,7 +520,7 @@ RSpec.describe "bundle install with gems on multiple sources" do
|
|||
|
||||
it "fails" do
|
||||
bundle :install, artifice: "compact_index", raise_on_error: false
|
||||
expect(err).to include("Could not find gem 'private_gem_1' in rubygems repository https://gem.repo2/, cached gems or installed locally.")
|
||||
expect(err).to include("Could not find gem 'private_gem_1' in rubygems repository https://gem.repo2/ or installed locally.")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -611,7 +611,7 @@ RSpec.describe "bundle install with gems on multiple sources" do
|
|||
Could not find compatible versions
|
||||
|
||||
Because every version of depends_on_rack depends on rack >= 0
|
||||
and rack >= 0 could not be found in rubygems repository https://gem.repo2/, cached gems or installed locally,
|
||||
and rack >= 0 could not be found in rubygems repository https://gem.repo2/ or installed locally,
|
||||
depends_on_rack cannot be used.
|
||||
So, because Gemfile depends on depends_on_rack >= 0,
|
||||
version solving has failed.
|
||||
|
|
|
@ -395,7 +395,7 @@ RSpec.describe "bundle install with specific platforms" do
|
|||
G
|
||||
|
||||
error_message = <<~ERROR.strip
|
||||
Could not find gem 'sorbet-static (= 0.5.6433)' with platform 'arm64-darwin-21' in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally.
|
||||
Could not find gem 'sorbet-static (= 0.5.6433)' with platform 'arm64-darwin-21' in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
|
||||
|
||||
The source contains the following gems matching 'sorbet-static (= 0.5.6433)':
|
||||
* sorbet-static-0.5.6433-universal-darwin-20
|
||||
|
@ -434,7 +434,7 @@ RSpec.describe "bundle install with specific platforms" do
|
|||
Could not find compatible versions
|
||||
|
||||
Because every version of sorbet depends on sorbet-static = 0.5.6433
|
||||
and sorbet-static = 0.5.6433 could not be found in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally for any resolution platforms (arm64-darwin-21),
|
||||
and sorbet-static = 0.5.6433 could not be found in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally for any resolution platforms (arm64-darwin-21),
|
||||
sorbet cannot be used.
|
||||
So, because Gemfile depends on sorbet = 0.5.6433,
|
||||
version solving has failed.
|
||||
|
@ -473,7 +473,7 @@ RSpec.describe "bundle install with specific platforms" do
|
|||
bundle "lock", raise_on_error: false, env: { "BUNDLE_FORCE_RUBY_PLATFORM" => "true" }
|
||||
|
||||
expect(err).to include <<~ERROR.rstrip
|
||||
Could not find gem 'sorbet-static (= 0.5.9889)' with platform 'ruby' in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally.
|
||||
Could not find gem 'sorbet-static (= 0.5.9889)' with platform 'ruby' in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
|
||||
|
||||
The source contains the following gems matching 'sorbet-static (= 0.5.9889)':
|
||||
* sorbet-static-0.5.9889-#{Gem::Platform.local}
|
||||
|
|
|
@ -197,7 +197,7 @@ RSpec.describe "bundle flex_install" do
|
|||
Could not find compatible versions
|
||||
|
||||
Because rack-obama >= 2.0 depends on rack = 1.2
|
||||
and rack = 1.2 could not be found in rubygems repository #{file_uri_for(gem_repo2)}/, cached gems or installed locally,
|
||||
and rack = 1.2 could not be found in rubygems repository #{file_uri_for(gem_repo2)}/ or installed locally,
|
||||
rack-obama >= 2.0 cannot be used.
|
||||
So, because Gemfile depends on rack-obama = 2.0,
|
||||
version solving has failed.
|
||||
|
|
|
@ -434,7 +434,7 @@ RSpec.describe "bundle install with install-time dependencies" do
|
|||
end
|
||||
|
||||
nice_error = <<~E.strip
|
||||
Could not find gems matching 'sorbet-static (= 0.5.10554)' valid for all resolution platforms (arm64-darwin-21, aarch64-linux) in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally.
|
||||
Could not find gems matching 'sorbet-static (= 0.5.10554)' valid for all resolution platforms (arm64-darwin-21, aarch64-linux) in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
|
||||
|
||||
The source contains the following gems matching 'sorbet-static (= 0.5.10554)':
|
||||
* sorbet-static-0.5.10554-universal-darwin-21
|
||||
|
@ -490,7 +490,7 @@ RSpec.describe "bundle install with install-time dependencies" do
|
|||
|
||||
it "raises a proper error" do
|
||||
nice_error = <<~E.strip
|
||||
Could not find gems matching 'sorbet-static' valid for all resolution platforms (arm-linux, x86_64-linux) in rubygems repository #{file_uri_for(gem_repo4)}/, cached gems or installed locally.
|
||||
Could not find gems matching 'sorbet-static' valid for all resolution platforms (arm-linux, x86_64-linux) in rubygems repository #{file_uri_for(gem_repo4)}/ or installed locally.
|
||||
|
||||
The source contains the following gems matching 'sorbet-static':
|
||||
* sorbet-static-0.5.10696-x86_64-linux
|
||||
|
|
Загрузка…
Ссылка в новой задаче