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

Raise an error when adding a gem incompatible with some locked platform #7035

Merged
merged 4 commits into from
Oct 6, 2023

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Oct 4, 2023

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

While working on #5700, I noticed that when locking multiple platforms, and adding a new dependency to the Gemfile that does not support some of the platforms, we may end up with a successful resolution, and a lockfile that's not really valid.

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

My fix is to prevent this situation at the resolver level, and give a proper error about it.

Since there are existing lockfiles with this bug, which will no longer bundle update fine even on platforms where they are valid, I also made sure to detect invalid platforms like these and remove them before re-resolving, so that the lockfile continues to work in the platforms where it was valid.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez force-pushed the multiplatform-resolve-fix branch 2 times, most recently from 7c93cf2 to 5d7f0df Compare October 5, 2023 06:19
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review October 5, 2023 08:03
@deivid-rodriguez deivid-rodriguez merged commit e6bd3cb into master Oct 6, 2023
92 checks passed
@deivid-rodriguez deivid-rodriguez deleted the multiplatform-resolve-fix branch October 6, 2023 20:13
deivid-rodriguez added a commit that referenced this pull request Oct 13, 2023
Raise an error when adding a gem incompatible with some locked platform

(cherry picked from commit e6bd3cb)
deivid-rodriguez added a commit that referenced this pull request Oct 13, 2023
Raise an error when adding a gem incompatible with some locked platform

(cherry picked from commit e6bd3cb)
deivid-rodriguez added a commit that referenced this pull request Oct 13, 2023
Raise an error when adding a gem incompatible with some locked platform

(cherry picked from commit e6bd3cb)
deivid-rodriguez added a commit that referenced this pull request Oct 16, 2023
Raise an error when adding a gem incompatible with some locked platform

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

None yet

1 participant