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

[FEATURE] copy the Gemfile.lock as Gemfile.next.lock before running #24

Closed
fbuys opened this issue Oct 22, 2021 · 0 comments · Fixed by #25
Closed

[FEATURE] copy the Gemfile.lock as Gemfile.next.lock before running #24

fbuys opened this issue Oct 22, 2021 · 0 comments · Fixed by #25

Comments

@fbuys
Copy link

fbuys commented Oct 22, 2021

When we create a Gemfile.next.lock from scratch, it uses the latest versions for all dependencies without explicit versions. This applies to dependencies of dependencies too.

Silently updating versions in the Gemfile.next.lock can create bugs that are really hard to debug.

We should always copy the Gemfile.lock as Gemfile.next.lock before running next bundle install for the first time.
By adding an extra step to next --init we can make sure that no unintentional version jumps are made.

We add the extra copy step like this:
cp Gemfile.lock Gemfile.next.lock

For context:

to illustrate the problem, we found that issue in an upgrade today, the client started
the upgrade and there was a dependency on the RestClient gem with > 1.6 , the 
Gemfile.lock sets 1.6.9, but since the Gemfile.next.lock was created from scratch,
it was using the latest 2.x... version, which includes breaking changes! and it was 
pretty hard to debug because it was not related to the things that were updated explicitly
fbuys added a commit that referenced this issue Oct 22, 2021
We initialize the Gemfile.next.lock by copying the content of the
existing Gemfile.lock. This prevents major version jumps when we use
this gem without an initial Gemfile.next.lock.

This commit closes: #24
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 a pull request may close this issue.

1 participant