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 incorrect lockfiles being generated in some situations #7307

Merged
merged 5 commits into from
Dec 21, 2023

Conversation

deivid-rodriguez
Copy link
Member

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

Since 5f24f06, Bundler will automatically complete the resolution it found with extra platforms that are also valid for the resolution that was initially found.

However, if one of the platform specific gems being added brings extra dependencies, the new resolution will never be invalid since we'll be missing the extra dependency.

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

This PR fixes the issue by avoiding the addition of platforms and platform specific gems in the above situation.

Closes #7304.

Builds on top of #7306.

Make sure the following tasks are checked

Before, every time we accessed a spec set with a name not present in the
underlying hash, an entry with an empty set of specs was created for it.
I think it's best to assume all keys in a spec set have actual keys, at
least I was assuming that until I found about this.
@deivid-rodriguez deivid-rodriguez merged commit 10d74a3 into master Dec 21, 2023
81 checks passed
@deivid-rodriguez deivid-rodriguez deleted the fix-incorrect-lockfile branch December 21, 2023 11:31
deivid-rodriguez added a commit that referenced this pull request Dec 21, 2023
Fix incorrect lockfiles being generated in some situations

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

Platform Auto-Locking Whiplashes with Fresh Lockfile
1 participant