Skip to content

Conversation

@deivid-rodriguez
Copy link
Contributor

@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 from 666496a to b9e6c4b Compare October 4, 2023 22:02
@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 force-pushed the multiplatform-resolve-fix branch from 5d7f0df to 25304f3 Compare October 5, 2023 06:40
@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
@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.

2 participants