Skip to content

#278 add upper version bounds for fbe and judges#278

Open
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:278-gemfile-constraints
Open

#278 add upper version bounds for fbe and judges#278
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:278-gemfile-constraints

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Both fbe and judges are pre-1.0 gems where minor version bumps may introduce breaking changes — API changes, CLI option changes, S-expression query syntax changes, and exit code changes.

The problem

# Before: no upper bound — could jump to 1.0 or higher
gem 'fbe', '>0'
gem 'judges', '>0'

If someone runs bundle update (accidentally or during Docker build without a lock file), versions could jump to a hypothetical 1.0 with breaking changes.

The fix

# After: constrained to 0.x series
gem 'fbe', '~>0'
gem 'judges', '~>0'

~>0 means >= 0 and < 1 — allows all 0.x releases but prevents jumping to 1.0.

Impact

Operation Before After
bundle install (with lock) Exact version from lock Same — lock wins
bundle update Could jump to 1.0 Stays within 0.x
bundle install (without lock) Latest version Latest 0.x

The Gemfile.lock already pins exact versions, so production builds are unaffected. This change protects the next bundle update from surprise breakage.

Checklist

  • bundle exec rubocop — 0 offences
  • bundle exec rake — all tasks pass
  • HoC ≤ 133

@yegor256 please review

@VasilevNStas VasilevNStas requested a review from yegor256 as a code owner June 29, 2026 17:00
VasilevNStas added a commit to VasilevNStas/swarm-template that referenced this pull request Jun 29, 2026
Both fbe and judges are pre-1.0 gems where minor version bumps may
introduce breaking changes (API changes, CLI option changes, S-expression
query changes, exit code changes).

Changing from `>0` to `~>0` constrains updates to the 0.x series,
preventing `bundle update` from accidentally jumping to a hypothetical
1.0 release. The Gemfile.lock already pins exact versions, but the
Gemfile constraint protects against lockfile regeneration.

Other gems with `>0` (rubocop-*) are dev-only tools and less critical.
@VasilevNStas VasilevNStas force-pushed the 278-gemfile-constraints branch from 4939756 to efcb12b Compare June 29, 2026 17:06
VasilevNStas added a commit to VasilevNStas/swarm-template that referenced this pull request Jun 29, 2026
Both fbe and judges are pre-1.0 gems where minor version bumps may
introduce breaking changes (API changes, CLI option changes, S-expression
query changes, exit code changes).

Changing from `>0` to `~>0` constrains updates to the 0.x series,
preventing `bundle update` from accidentally jumping to a hypothetical
1.0 release. The Gemfile.lock already pins exact versions, but the
Gemfile constraint protects against lockfile regeneration.

Other gems with `>0` (rubocop-*) are dev-only tools and less critical.
@VasilevNStas VasilevNStas force-pushed the 278-gemfile-constraints branch from efcb12b to ae0e517 Compare June 29, 2026 17:09
Both fbe and judges are pre-1.0 gems where minor version bumps may
introduce breaking changes (API changes, CLI option changes, S-expression
query changes, exit code changes).

Changing from `>0` to `~>0` constrains updates to the 0.x series,
preventing `bundle update` from accidentally jumping to a hypothetical
1.0 release. The Gemfile.lock already pins exact versions, but the
Gemfile constraint protects against lockfile regeneration.

Other gems with `>0` (rubocop-*) are dev-only tools and less critical.
@VasilevNStas VasilevNStas force-pushed the 278-gemfile-constraints branch from ae0e517 to 97b7d67 Compare June 29, 2026 17:11
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 — both fbe and judges are pre-1.0 gems where minor bumps may introduce breaking changes (CLI options, exit codes, S-expression syntax). The Gemfile had >0 with no upper bound. ~>0 constrains to the 0.x series, preventing bundle update from jumping to a hypothetical 1.0. Bonus: updates fbe 0.47→0.48 and judges 0.58→0.60 in the lockfile.

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