Skip to content

Commit

Permalink
Don't suggest --full-index on API Response mismatch errors
Browse files Browse the repository at this point in the history
I've never seen this error in real life, and if it was happening, I
think it's either some server side issue that would need to be fixed or
some transient issue. We should move away from the full index, since
it's slow, so let's stop recommending it.
  • Loading branch information
deivid-rodriguez authored and hsbt committed Mar 23, 2023
1 parent c3fa667 commit a9146bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/shared_helpers.rb
Expand Up @@ -160,7 +160,7 @@ def ensure_same_dependencies(spec, old_deps, new_deps)
" (was expecting #{old_deps.map(&:to_s)}, but the real spec has #{new_deps.map(&:to_s)})"
raise APIResponseMismatchError,
"Downloading #{spec.full_name} revealed dependencies not in the API or the lockfile (#{extra_deps.join(", ")})." \
"\nEither installing with `--full-index` or running `bundle update #{spec.name}` should fix the problem."
"\nRunning `bundle update #{spec.name}` should fix the problem."
end

def pretty_dependency(dep)
Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/install/gems/compact_index_spec.rb
Expand Up @@ -930,7 +930,7 @@ def start
expect(out).to include("rails-2.3.2 from rubygems remote at #{source_uri}/ has either corrupted API or lockfile dependencies")
expect(err).to include(<<-E.strip)
Bundler::APIResponseMismatchError: Downloading rails-2.3.2 revealed dependencies not in the API or the lockfile (#{deps.map(&:to_s).join(", ")}).
Either installing with `--full-index` or running `bundle update rails` should fix the problem.
Running `bundle update rails` should fix the problem.
E
end

Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/lock/lockfile_spec.rb
Expand Up @@ -1218,7 +1218,7 @@
G

expect(err).to include("Downloading rack_middleware-1.0 revealed dependencies not in the API or the lockfile (#{Gem::Dependency.new("rack", "= 0.9.1")}).").
and include("Either installing with `--full-index` or running `bundle update rack_middleware` should fix the problem.")
and include("Running `bundle update rack_middleware` should fix the problem.")
end

it "regenerates a lockfile with no specs" do
Expand Down

0 comments on commit a9146bd

Please sign in to comment.