Skip to content

fix: Carry unlock requests over to the alternate lockfile again - #78

Open
nekketsuuu wants to merge 1 commit into
Shopify:mainfrom
nekketsuuu:nekketsuuu-fix-unlock-propagation
Open

nekketsuuu wants to merge 1 commit into
Shopify:mainfrom
nekketsuuu:nekketsuuu-fix-unlock-propagation

Conversation

@nekketsuuu

Copy link
Copy Markdown
Contributor

Since ruby/rubygems#8489, released in Bundler 2.6.4, Bundler::Definition no longer keeps the unlock argument in @unlock, so reading it always returns nil. As a result, bundle update <gem> did not update the alternate lockfile unless the Gemfile itself changed.

Capture the unlock argument when a Definition is initialized and pass it on when resolving the alternate lockfile. Bundler mutates the unlock hash it receives, so keep a frozen copy and hand Bundler a fresh copy each time.

Since ruby/rubygems#8489, released in
Bundler 2.6.4, Bundler::Definition no longer keeps the unlock argument
in `@unlock`, so reading it always returns `nil`. As a result,
`bundle update <gem>` did not update the alternate lockfile unless the
Gemfile itself changed.

Capture the unlock argument when a Definition is initialized and pass it
on when resolving the alternate lockfile. Bundler mutates the unlock
hash it receives, so keep a frozen copy and hand Bundler a fresh copy each time.
@nekketsuuu

Copy link
Copy Markdown
Contributor Author

Note: This pull request might close #69

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant