Skip to content

Declare cucumber as a development dependency - #1856

Merged
neilvcarvalho merged 2 commits into
mainfrom
nc/cucumber-dev-dependency
Oct 30, 2026
Merged

neilvcarvalho merged 2 commits into
mainfrom
nc/cucumber-dev-dependency

Conversation

@neilvcarvalho

@neilvcarvalho neilvcarvalho commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Every matrix job in CI has failed since 2026-10-16, on any branch, before a single spec runs:

LoadError: cannot load such file -- cucumber/rake/task (LoadError)
  Rakefile:6

Cause

cucumber was never declared as a dependency of this project. It arrived through aruba, a development dependency, which listed cucumber as a runtime dependency up to 2.x. aruba 3.0.0 (2026-10-16) "depends only on cucumber-core at runtime" and moved cucumber to its own development dependencies.

The build workflow resolves the appraisal gemfiles fresh on every run, because gemfiles/*.gemfile.lock are not tracked, so every matrix job now installs aruba 3.0.1 without cucumber. The standard job keeps passing because it uses the tracked Gemfile.lock, which pins aruba 2.3.2, and local runs keep passing because the untracked appraisal lockfiles on a developer machine pin whatever aruba they last resolved. main's last green matrix run was the push on 2026-10-13, before the aruba release.

Change

Declare cucumber as a development dependency in the gemspec, with a floor of 10, since the Rakefile and the features use it directly. Gemfile.lock gains the cucumber (>= 10) line under DEPENDENCIES; the gem itself was already in the lock through aruba.

The floor matters on Ruby 3.2. The first CI run of this PR, with cucumber unconstrained, passed everywhere except the five Ruby 3.2 jobs: Bundler kept aruba 3 and its cucumber-core 20, could not use cucumber 12 (Ruby 3.3 or newer) or cucumber 11 (cucumber-core below 17), and fell back to cucumber 1.3.20, which rejects the --publish-quiet option in cucumber.yml. With the floor, Ruby 3.2 resolves aruba 3 with cucumber 11, Ruby 3.1 resolves aruba 2 with cucumber 10, and Ruby 3.3 or newer resolves cucumber 12, all of which aruba supports.

Verification

  • Reproduced CI's resolution in a clean checkout with no appraisal lockfile: BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle install now resolves aruba 3.0.1, cucumber 12.0.1 and cucumber-core 20.0.0, and bundle exec rake all_specs passes: 334 unit examples, 451 acceptance examples, 4 Cucumber scenarios. aruba 3 still ships aruba/cucumber, which features/support/env.rb requires, so the features run unchanged.
  • Reproduced the Ruby 3.2 case the same way under Ruby 3.2.11: with the floor, the fresh resolution gives aruba 3.0.1, cucumber 11.1.1 and cucumber-core 16.2.0, and bundle exec rake all_specs passes with the same counts.
  • The default Gemfile still resolves with the tracked lock unchanged apart from the new dependency entry.

The Rakefile requires cucumber's rake task and the features load
aruba's cucumber integration, but cucumber was never declared as a
dependency. It arrived through aruba, which listed it as a runtime
dependency up to 2.x. aruba 3.0.0, released on 2026-10-16, depends
only on cucumber-core at runtime and moved cucumber to its own
development dependencies.

The build workflow resolves the appraisal gemfiles fresh on every run
because their lockfiles are not tracked, so since that release every
matrix job installs aruba 3 without cucumber and fails at Rakefile
line 6 with "cannot load such file -- cucumber/rake/task" before any
spec runs. The standard job and local runs still pass because the
tracked Gemfile.lock and the local appraisal lockfiles pin aruba 2.

Declare cucumber directly, since this project uses it directly.
Gemfile.lock gains the dependency entry; cucumber itself was already
in it. aruba 3 still ships aruba/cucumber, so the features run
unchanged under aruba 3 and cucumber 12.
With cucumber declared but unconstrained, Bundler on Ruby 3.2 keeps
aruba 3 and its cucumber-core 20, cannot use cucumber 12 (Ruby 3.3 or
newer) or cucumber 11 (cucumber-core below 17), and falls back to
cucumber 1.3.20. That version does not know the --publish-quiet option
in cucumber.yml, so the five Ruby 3.2 matrix jobs failed at the
features step after the specs passed. Ruby 3.1 resolved aruba 2 with
cucumber 10 and Ruby 3.3 or newer resolved cucumber 12, so only 3.2
was affected.

A floor of 10 rules the fallback out. Bundler then resolves aruba 3
with cucumber 11 on Ruby 3.2, aruba 2 with cucumber 10 on Ruby 3.1,
and cucumber 12 on Ruby 3.3 or newer, and aruba 3 supports cucumber
11 and 12.
@neilvcarvalho
neilvcarvalho merged commit cf9b56f into main Oct 30, 2026
39 checks passed
@neilvcarvalho
neilvcarvalho deleted the nc/cucumber-dev-dependency branch October 30, 2026 15:54
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