Updating collection lock is required on `bundle install`
Open
@pocke is already working on this.
Since Sep 16, 2021.
- Dominant language
- Ruby
- Stars
- 2.2k
- Forks
- 256
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 37
Description
Problem
bundle install (and bundle update) requires rbs collection update when it updates Gemfile.lock about gems which have sig/. For example:
- Install gem X v1.0.0 with bundler
rbs collection installrbs_collection.lock.yamlhas gem X entry with v1.0.0
bundle exec rbs validateor something- It works
- Update gem X to v1.0.1 with bundler
- Gemfile.lock is updated
bundle exec rbs validateor something- It doesn't work because
rbs_collection.lock.yamlspecifies gem X v1.0.0 but the version doesn't exist in the Bundler environment. - So we need to re-run
rbs collection installto updaterbs_collection.lock.yaml.
- It doesn't work because
I think it is not a bug, but it takes time. Too strict I guess.
I can imagine this behavior will be a blocker of dependabot. For example:
- Dependabot creates a PR to update gem X from v1.0.0 to v1.0.1
- CI runs with
rbs collection install --freezeandsteep check - It fails because
rbs_collection.lock.yamlhas gem X v1.0.0 but actually v1.0.1 is installed.
Solution idea
Add an option to relax the version specification.
For example
- The configuration file has an option like
prefer_gemfile_lock_version(the naming is tentative) - If the option is enabled, rbs collection ignores version in
rbs_collection.lock.yamlfi the source isrubygems. Then it uses versions in Gemfile.lock instaed. - The problem is solved...?
I got feedback from @ybiquitous. Thanks!
https://twitter.com/ybiquitous/status/1438019865130848258
I guess your problem is the same as mine. If your problem is a different one, feel free comment to on this issue or create a new issue. Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.