Ruby does not build against cucumber-messages 25.0.0
Closed this issue ยท 8 comments
๐ What did you see?
A new release of RubyGems is available: 3.4.19 โ 3.5.15!
Run `gem update --system 3.5.15` to update your installation.
==> Starting check()...
/usr/bin/ruby -I/usr/lib/ruby/gems/3.2.0/gems/rspec-support-3.12.1/lib:/usr/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib /us
......FFFFFFFFFFFFFFFFFFFFFFFF.
Failures:
1) Gherkin can process feature file paths
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:11:in `new'
# ./lib/gherkin.rb:11:in `from_paths'
# ./spec/gherkin/gherkin_spec.rb:6:in `block (2 levels) in <top (required)>'
2) Gherkin can process feature file content
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/gherkin_spec.rb:19:in `block (2 levels) in <top (required)>'
3) Gherkin can set the default dialect for the feature file content
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/gherkin_spec.rb:34:in `block (2 levels) in <top (required)>'
4) Gherkin::Parser.new can be invoked with no args
Failure/Error:
def initialize(ast_builder = AstBuilder.new(Cucumber::Messages::IdGenerator::UUID.new))
@ast_builder = ast_builder
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/parser.rb:59:in `initialize'
# ./spec/gherkin/parser_spec.rb:7:in `new'
# ./spec/gherkin/parser_spec.rb:7:in `block (3 levels) in <top (required)>'
5) Gherkin::Query#update when the feature file is empty does not fail
Failure/Error:
expect do
messages.each { |message| subject.update(message) }
end.not_to raise_exception
expected no Exception, got #<NameError: uninitialized constant Cucumber::Messages::IdGenerator> with backtrace:
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:69:in `block (5 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:68:in `block (4 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:68:in `block (4 levels) in <top (required)>'
6) Gherkin::Query#scenario_parent_locations raises an exception if called with an invalid id
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:77:in `block (3 levels) in <top (required)>'
7) Gherkin::Query#scenario_parent_locations without rule provides the feature and background locations of a given scenario n
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:77:in `block (3 levels) in <top (required)>'
8) Gherkin::Query#scenario_parent_locations with rule provides the feature, background, rule, and rule background locations
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:77:in `block (3 levels) in <top (required)>'
9) Gherkin::Query#scenario_parent_locations in a scenario outline provides the feature and background locations of a given s
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:77:in `block (3 levels) in <top (required)>'
10) Gherkin::Query#location raises an exception when the AST node ID is unknown
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
11) Gherkin::Query#location provides the location of a scenario
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
12) Gherkin::Query#location provides the location of an examples table row
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
13) Gherkin::Query#location when querying steps provides the location of a background step
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
14) Gherkin::Query#location when querying steps provides the location of a scenario step
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
15) Gherkin::Query#location when querying tags provides the location of a feature tags
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
16) Gherkin::Query#location when querying tags provides the location of a scenario tags
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
17) Gherkin::Query#location when querying tags provides the location of scenario examples tags
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
18) Gherkin::Query#location when querying tags provides the location of a rule tag
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
19) Gherkin::Query#location when children are scoped in a Rule provides the location of a background step
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
20) Gherkin::Query#location when children are scoped in a Rule provides the location of a scenario
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
21) Gherkin::Query#location when children are scoped in a Rule provides the location of a scenario tag
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
22) Gherkin::Query#location when children are scoped in a Rule provides the location of a scenario step
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./lib/gherkin.rb:19:in `new'
# ./lib/gherkin.rb:19:in `from_sources'
# ./lib/gherkin.rb:27:in `from_source'
# ./spec/gherkin/query_spec.rb:22:in `block (2 levels) in <top (required)>'
# ./spec/gherkin/query_spec.rb:127:in `block (3 levels) in <top (required)>'
23) Gherkin::Stream::ParserMessageStream#messages raises an exception on second iteration
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./spec/gherkin/stream/parser_message_stream_spec.rb:35:in `new'
# ./spec/gherkin/stream/parser_message_stream_spec.rb:35:in `block (3 levels) in <module:Stream>'
24) Gherkin::Stream::ParserMessageStream options.id_generator when not set generates random UUIDs
Failure/Error: id_generator = options[:id_generator] || Cucumber::Messages::IdGenerator::UUID.new
NameError:
uninitialized constant Cucumber::Messages::IdGenerator
# ./lib/gherkin/stream/parser_message_stream.rb:14:in `initialize'
# ./spec/gherkin/stream/parser_message_stream_spec.rb:28:in `new'
# ./spec/gherkin/stream/parser_message_stream_spec.rb:28:in `block (2 levels) in <module:Stream>'
# ./spec/gherkin/stream/parser_message_stream_spec.rb:31:in `block (2 levels) in <module:Stream>'
# ./spec/gherkin/stream/parser_message_stream_spec.rb:45:in `block (4 levels) in <module:Stream>'
Finished in 0.01352 seconds (files took 0.07456 seconds to load)
31 examples, 24 failures
Failed examples:
rspec ./spec/gherkin/gherkin_spec.rb:5 # Gherkin can process feature file paths
rspec ./spec/gherkin/gherkin_spec.rb:16 # Gherkin can process feature file content
rspec ./spec/gherkin/gherkin_spec.rb:30 # Gherkin can set the default dialect for the feature file content
rspec ./spec/gherkin/parser_spec.rb:6 # Gherkin::Parser.new can be invoked with no args
rspec ./spec/gherkin/query_spec.rb:67 # Gherkin::Query#update when the feature file is empty does not fail
rspec ./spec/gherkin/query_spec.rb:120 # Gherkin::Query#scenario_parent_locations raises an exception if called with an invalid id
rspec ./spec/gherkin/query_spec.rb:86 # Gherkin::Query#scenario_parent_locations without rule provides the feature and background locations of a given scenario node id
rspec ./spec/gherkin/query_spec.rb:99 # Gherkin::Query#scenario_parent_locations with rule provides the feature, background, rule, and rule background locations of a given scenario node id
rspec ./spec/gherkin/query_spec.rb:112 # Gherkin::Query#scenario_parent_locations in a scenario outline provides the feature and background locations of a given scenario outline node id
rspec ./spec/gherkin/query_spec.rb:135 # Gherkin::Query#location raises an exception when the AST node ID is unknown
rspec ./spec/gherkin/query_spec.rb:139 # Gherkin::Query#location provides the location of a scenario
rspec ./spec/gherkin/query_spec.rb:143 # Gherkin::Query#location provides the location of an examples table row
rspec ./spec/gherkin/query_spec.rb:152 # Gherkin::Query#location when querying steps provides the location of a background step
rspec ./spec/gherkin/query_spec.rb:156 # Gherkin::Query#location when querying steps provides the location of a scenario step
rspec ./spec/gherkin/query_spec.rb:167 # Gherkin::Query#location when querying tags provides the location of a feature tags
rspec ./spec/gherkin/query_spec.rb:171 # Gherkin::Query#location when querying tags provides the location of a scenario tags
rspec ./spec/gherkin/query_spec.rb:175 # Gherkin::Query#location when querying tags provides the location of scenario examples tags
rspec ./spec/gherkin/query_spec.rb:179 # Gherkin::Query#location when querying tags provides the location of a rule tag
rspec ./spec/gherkin/query_spec.rb:191 # Gherkin::Query#location when children are scoped in a Rule provides the location of a background step
rspec ./spec/gherkin/query_spec.rb:195 # Gherkin::Query#location when children are scoped in a Rule provides the location of a scenario
rspec ./spec/gherkin/query_spec.rb:199 # Gherkin::Query#location when children are scoped in a Rule provides the location of a scenario tag
rspec ./spec/gherkin/query_spec.rb:203 # Gherkin::Query#location when children are scoped in a Rule provides the location of a scenario step
rspec ./spec/gherkin/stream/parser_message_stream_spec.rb:34 # Gherkin::Stream::ParserMessageStream#messages raises an exception on second iteration
rspec ./spec/gherkin/stream/parser_message_stream_spec.rb:44 # Gherkin::Stream::ParserMessageStream options.id_generator when not set generates random UUIDs
/usr/bin/ruby -I/usr/lib/ruby/gems/3.2.0/gems/rspec-support-3.12.1/lib:/usr/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib /usr/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
โ What did you expect to see?
Clean running tests
๐ฆ Which tool/library version are you using?
ruby 3.2.4
cucumber-messages 23.0.0
๐ฌ How could we reproduce it?
Just try to run the tests of the 28.0.0 release of this gem against the named defendencies
๐ Any additional context?
No response
Just try to run the tests of the 28.0.0 release of this gem against the named defendencies
CI does this constantly without fail. Do you have a more precisely specified reproducer?
I'm one of the ruby maintainers for Arch Linux and we are currently rebuilding all packages against ruby 3.2 in our [extra-staging] repository and there I saw the issue. You can have a look at https://archlinux.org/packages/?page=1&sort=&repo=Core-Staging&repo=Extra-Staging&q=ruby&maintainer=&flagged= where we list all packages currently in staging.
Our internal ticket with a patch to fix the issue: https://gitlab.archlinux.org/archlinux/packaging/packages/ruby-cucumber-gherkin/-/issues/1
The current definition of the package which is working now: https://gitlab.archlinux.org/archlinux/packaging/packages/ruby-cucumber-gherkin/-/blob/main/PKGBUILD which includes this patch to work around this issue: https://gitlab.archlinux.org/archlinux/packaging/packages/ruby-cucumber-gherkin/-/blob/main/ruby-cucumber-gherkin_fix_tests.patch
I should mention I tried to build with version 28.0.0
of this gem here.
I think https://gitlab.archlinux.org/archlinux/packaging/packages/ruby-cucumber-gherkin/-/issues/1#note_197356 will explain why we are having this issue. We break up the upper version constraint as we don't like to hold back packages due to dependency issues.
Right. You are using cucumber-gherkin 28.0.0 with cucumber-messages 25.0.1 instead of 24. That explains.
We break up the upper version constraint as we don't like to hold back packages due to dependency issues.
I see. I'm not sure how practical that approach is, but it is yours to take.
As Cucumber messages v25 was only just released. It will eventually propagate to the other dependencies in the cucumber ecosystem.
@luke-hill would you potentially welcome a pull request from @Segaja to upgrade messages to 25? Or you got more things in mind.
Note: Everyone one working on Cucumber is practically a volunteer. And it is the holidays, it might be a while before you have an answer.
Currently don't have good email connectivity due to job situation. Just spotted this. I'm working on updating it now. Won't be long before a fix is in. Maybe a week - it's a tiny fix needed.
FYI once this lands more updates will be needed to other cucumber libraries - I've not got around to using the latest messages yet elsewhere.
cc/ @Segaja