Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve edge case error message #6733

Merged
merged 11 commits into from Jun 13, 2023

Conversation

deivid-rodriguez
Copy link
Member

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

When the lockfile is missing some specs, and we are in frozen mode, we'll get a confusing error such as:

Could not find gem 'tzinfo-data' in rubygems repository https://rubygems.org/ or installed locally.

Confusing because tzinfo-data is actually available at rubygems.org.

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

My fix is to make sure that we point at the real culprit: a corrupt lockfile.

Closes #6677.

Make sure the following tasks are checked

For conciseness and consistency with printing the relative path to the
lockfile just before.
I think it communicates better what's going on.
This error message is also printed when using `bundler/setup` in frozen
model, so we're not necessarily installing any gems when it happens.

This new message play nicer with all situations.
When a top level dependency is missing from the lockfile, and we're in
frozen mode, we should also print a "frozen error".
@deivid-rodriguez deivid-rodriguez force-pushed the improve-error-message-in-frozen-mode branch from b7d535b to 3e82b83 Compare June 13, 2023 09:33
@deivid-rodriguez deivid-rodriguez merged commit c13621a into master Jun 13, 2023
92 checks passed
@deivid-rodriguez deivid-rodriguez deleted the improve-error-message-in-frozen-mode branch June 13, 2023 11:24
deivid-rodriguez added a commit that referenced this pull request Jun 27, 2023
…n-mode

Improve edge case error message

(cherry picked from commit c13621a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alpine Linux: NoMethodError: undefined method `metadata' for nil:NilClass
1 participant