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

Fix crash when bundle exec'ing to bundler #4175

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

deivid-rodriguez
Copy link
Member

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

The problem was that bundle exec'ing to bundler itself would crash if the lockfile was generated with bundler 2.1.4 and it's missing the specific platform.

I can't think of any reason to bundle exec to bundler, but it shouldn't be a way to make bundler crash.

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

In this case, the crash was due to bundle exec'ing on a definition missing the current specific platform (due to lockfile generated with older bundler). The definition would resolve gems in the main process, and then would tried to be re-resolved again inside the "bundle exec" context because of the missing platform. This double resolution would cause bundler to crash.

I don't see why we should raise an exception in this situation, specially such a cryptic one, so don't raise it.

Fixes #4153.

Make sure the following tasks are checked

I can't think of any reason to `bundle exec`'ing to `bundler`, but it
shouldn't be a way to make bundler crash.

In this case, the crash was due to `bundle exec`'ing on a definition
missing the current specific platform (due to lockfile generated with
older bundler). The definition would resolve gems in the main process,
and then would tried to be re-resolved again inside the "bundle exec"
context because of the missing platform. This double resolution would
cause bundler to crash.

I don't see why we should raise an exception in this situation,
specially such a cryptic one, so don't raise it.
@deivid-rodriguez
Copy link
Member Author

Thanks for having a look @simi!

@deivid-rodriguez deivid-rodriguez merged commit 6e3a4f8 into master Dec 21, 2020
@deivid-rodriguez deivid-rodriguez deleted the fix_bundle_exec_bundle_crash branch December 21, 2020 08:17
deivid-rodriguez added a commit that referenced this pull request Dec 22, 2020
Fix crash when `bundle exec`'ing to bundler

(cherry picked from commit 6e3a4f8)
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.

Bundler 2.2.1 - bundle package fails
3 participants