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

Update documentation around checking in the Gemfile.lock #5879

Open
indirect opened this issue Jul 20, 2017 · 8 comments

Comments

@indirect
Copy link
Member

commented Jul 20, 2017

When Bundler first shipped, we gitignored the Gemfile.lock inside gems, following the advice given in this blog post.

Over time, however, it became clear that this practice forces the pain of broken dependencies onto new contributors, while leaving existing contributors potentially unaware of the problem. As a result, we have revised our guidance for gem authors to now recommend checking in the lock for gems. We have also removed Gemfile.lock from the gitignore file generated in new gems.

This is a tracking ticket for any further documentation changes needed to support gem developers in this new pattern of checking in Gemfile.lock to support new contributors, while continuing to run at least one CI build against the newest version of all dependencies, resolved from scratch at the time of the CI run.

@arbonap

This comment has been minimized.

Copy link
Contributor

commented Nov 22, 2017

I'd be happy to help out with documentation changes reflecting the new recommendation to check in the lock for gems.

bundlerbot added a commit that referenced this issue Feb 13, 2018
Auto merge of #6184 - arbonap:pa-check-in-gemfile-docs, r=indirect
Update docs to reflect revised guidance to check in locks for gems

Thanks so much for the contribution!
To make reviewing this PR a bit easier, please fill out answers to the following questions.

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

The problem was...
- Bundler stopped gitignoring gem locks. The change was merged in but we need to reflect that change in documentation.
### What was your diagnosis of the problem?

My diagnosis was...
- To add in documentation explaining why Bunder now does _not_ gitignore gem locks.
### What is your fix for the problem, implemented in this PR?

My fix...
- Update the `gemfile.lock` section of `bundle install` man pages as well as the `gemfile` man page.
### Why did you choose this fix out of the possible options?

I chose this fix because...
- This addresses open issue #5879
@colby-swandale

This comment has been minimized.

Copy link
Member

commented Feb 20, 2018

This looks like it's been completed. Closing.

@mvz

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2018

@colby-swandale I think this part has not yet been addressed:

while continuing to run at least one CI build against the newest version of all dependencies, resolved from scratch at the time of the CI run.

@colby-swandale

This comment has been minimized.

Copy link
Member

commented Feb 23, 2018

@mvz You're right, thanks for pointing that out.

@rubymorillo

This comment has been minimized.

Copy link
Contributor

commented May 2, 2018

@indirect @colby-swandale I'm happy to take this one on. I need help clarifying this, though: where do we want this:

while continuing to run at least one CI build against the newest version of all dependencies, resolved from scratch at the time of the CI run.

to be called out? In the bundle-install.ronn man page?

@rubymorillo rubymorillo self-assigned this May 2, 2018

@segiddins

This comment has been minimized.

Copy link
Member

commented May 3, 2018

@rubymorillo

This comment has been minimized.

Copy link
Contributor

commented May 4, 2018

@segiddins possibly. It's a how-to guide, though, and doesn't already make mention of CI. Here are the high-level sections:

  • Getting Started
  • Testing our gem
  • Using other gems
  • Testing a CLI
  • Crafting a CLI
  • Testing a generator
  • Writing a generator
  • Releasing the gem

At which point in that outline would it make most sense to call out CI builds? cc @indirect

@segiddins

This comment has been minimized.

Copy link
Member

commented May 4, 2018

Probably within testing our gem?

colby-swandale added a commit that referenced this issue Oct 5, 2018
Auto merge of #6184 - arbonap:pa-check-in-gemfile-docs, r=indirect
Update docs to reflect revised guidance to check in locks for gems

Thanks so much for the contribution!
To make reviewing this PR a bit easier, please fill out answers to the following questions.

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

The problem was...
- Bundler stopped gitignoring gem locks. The change was merged in but we need to reflect that change in documentation.
### What was your diagnosis of the problem?

My diagnosis was...
- To add in documentation explaining why Bunder now does _not_ gitignore gem locks.
### What is your fix for the problem, implemented in this PR?

My fix...
- Update the `gemfile.lock` section of `bundle install` man pages as well as the `gemfile` man page.
### Why did you choose this fix out of the possible options?

I chose this fix because...
- This addresses open issue #5879

(cherry picked from commit 30f7b45)
colby-swandale added a commit that referenced this issue Oct 5, 2018
Auto merge of #6184 - arbonap:pa-check-in-gemfile-docs, r=indirect
Update docs to reflect revised guidance to check in locks for gems

Thanks so much for the contribution!
To make reviewing this PR a bit easier, please fill out answers to the following questions.

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

The problem was...
- Bundler stopped gitignoring gem locks. The change was merged in but we need to reflect that change in documentation.
### What was your diagnosis of the problem?

My diagnosis was...
- To add in documentation explaining why Bunder now does _not_ gitignore gem locks.
### What is your fix for the problem, implemented in this PR?

My fix...
- Update the `gemfile.lock` section of `bundle install` man pages as well as the `gemfile` man page.
### Why did you choose this fix out of the possible options?

I chose this fix because...
- This addresses open issue #5879

(cherry picked from commit 30f7b45)
ncoden added a commit to ncoden/foundation-rails that referenced this issue Nov 16, 2018
chore: update lockfiles for v6.5.1
Note: the Gemfile.lock lockfile should now be commited, even for gems.

See bundler/bundler#5879
ncoden added a commit to ncoden/foundation-rails that referenced this issue Nov 16, 2018
chore: update lockfiles for v6.5.1
Note: the Gemfile.lock lockfile should now be commited, even for gems.

See bundler/bundler#5879
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Dec 17, 2018
taca
misc/ruby-bundler: update to 1.17.2
pkgsr change
* Remove @Prefix@ from ALTERNATIVES file.

## 1.17.2 (2018-12-11)

 - Add compatability for bundler merge with Ruby 2.6

## 1.17.1 (2018-10-25)

 - Convert `Pathname`s to `String`s before sorting them, fixing #6760 and #6758 ([#6761](bundler/bundler#6761), @alexggordon)

## 1.17.0 (2018-10-25)

No new changes.

## 1.17.0.pre.2 (2018-10-13)

Features:

  - Configure Bundler home, cache, config and plugin directories with `BUNDLE_USER_HOME`, `BUNDLE_USER_CACHE`, `BUNDLE_USER_CONFIG` and `BUNDLE_USER_PLUGIN` env vars ([#4333](bundler/bundler#4333), @gwerbin)
  - Add `--all` option to `bundle binstubs` that will generate an executable file for all gems with commands in the bundle
  - Add `bundle remove` command to remove gems from the Gemfile via the CLI
  - Improve checking file permissions and asking for `sudo` in Bundler when it doesn't need to
  - Add error message to `bundle add` to check adding duplicate gems to the Gemfile
  - When asking for `sudo`, Bundler will show a list of folders/files that require elevated permissions to write to.

The following new features are available but are not enabled by default. These are intended to be tested by users for the upcoming release of Bundler 2.

  - Improve deprecation warning message for `bundle show` command
  - Improve deprecation warning message for the `--force` option in `bundle install`

## 1.17.0.pre.1 (2018-09-24)

Features:

  - Check folder/file permissions of the Bundle home directory in the `bundle doctor` command ([#5786](bundler/bundler#5786), @ajwann)
  - Remove compiled gem extensions when running `bundle clean` ([#5596](bundler/bundler#5596), @akhramov)
  - Add `--paths` option to `bundle list` command ([#6172](bundler/bundler#6172), @colby-swandale)
  - Add base error class to gems generated from `bundle gem` ([#6260](bundler/bundler#6260), @christhekeele)
  - Correctly re-install gem extensions with a git source when running `bundle pristine` ([#6294](bundler/bundler#6294), @wagenet)
  - Add config option to disable platform warnings ([#6124](bundler/bundler#6124), @agrim123)
  - Add `--skip-install` option to `bundle add` command to add gems to the Gemfile without installation ([#6511](bundler/bundler#6511), @agrim123)
  - Add `--only-explicit` option to `bundle outdated` to list only outdated gems in the Gemfile ([#5366](bundler/bundler#5366), @peret)
  - Support adding multiple gems to the Gemfile with `bundle add` ([#6543](bundler/bundler#6543), @agrim123)
  - Make registered plugin events easier to manage in the Plugin API (@jules2689)
  - Add new gem install hooks to the Plugin API (@jules2689)
  - Add `--optimistic` and `--strict` options to `bundle add` ([#6553](bundler/bundler#6553), @agrim123)
  - Add `--without-group` and `--only-group` options to `bundle list` ([#6564](bundler/bundler#6564), @agrim123)
  - Add `--gemfile` option to the `bundle exec` command ([#5924](bundler/bundler#5924), @ankitkataria)

The following new features are available but are not enabled by default. These are intended to be tested by users for the upcoming release of Bundler 2.

  - Make `install --path` relative to the current working directory ([#2048](bundler/bundler#2048), @igorbozato)
  - Auto-configure job count ([#5808](bundler/bundler#5808), @segiddins)
  - Use the Gem Version Promoter for major gem updates ([#5993](bundler/bundler#5993), @segiddins)
  - Add config option to add the Ruby scope to `bundle config path` when configured globally (@segiddins)

## 1.16.6 (2018-10-05)

Changes:

  - Add an error message when adding a gem with `bundle add` that's already in the bundle ([#6341](bundler/bundler#6341), @agrim123)
  - Add Homepage, Source Code and Chanagelog URI metadata fields to the `bundle gem` gemspec template (@walf443)

Bugfixes:

  - Fix issue where updating a gem resulted in the gem's version being downgraded when `BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS` was set ([#6529](bundler/bundler#6529), @theflow)
  - Fix some rescue calls that don't specifiy error type (@utilum)
  - Fix an issue when the Lockfile would contain platform-specific gems that it didn't need ([#6491](bundler/bundler#6491), @segiddins)
  - Improve handlding of adding new gems with only a single group to the Gemfile in `bundle add` (@agrim123)
  - Refactor check for OpenSSL in `bundle env` (@voxik)
  - Remove an unnecessary assignment in Metadata (@voxik)

Documentation:

  - Update docs to reflect revised guidance to check in Gemfile.lock into version control for gems ([#5879](bundler/bundler#5879), @arbonap)
  - Add documentation for the `--all` flag in `bundle update` (@agrim123)
  - Update README to use `bundle add` in usage examples (@hdf1986)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.