Merged
Conversation
Previously, `example.metadata` would return a Hash which, for any
unknown key, would return _another_ hash. I think this was not the
intention, but it didn't lead to any errors, probably because both Hash
and Array implement `#empty?`.
In Ruby 3.4, the syntax resulted in an error:
unknown keyword: :shared_group_inclusion_backtrace
I believe the intention was for `example.metadata` to return the Hash
that contains the `shared_group_inclusion_backtrace` key, beginning as
an empty array.
The usage looks like this:
lib/buildkite/test_collector/rspec_plugin/trace.rb
63: !example.metadata[:shared_group_inclusion_backtrace].empty?
67: example.metadata[:shared_group_inclusion_backtrace].last.inclusion_location
The previous version of activesupport was not compatible with Ruby 3.4 because `mutex_m` has moved from stdlib to a bundled gem, and that old version of activesupport was depending on it but not explicitly declaring that. I don't believe this bump has any impact on usage of this test collector, only of development/testing thereof.
Contributor
|
It appears that requiring securerandom 0.4.1 is breaking the Ruby 2.7 and 3.0 builds
securerandom 0.3.2 works in Ruby 2.6 and above. Maybe we could give that a go? |
gchan
approved these changes
Feb 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Local development / testing was broken on latest Ruby 3.4 for a couple of reasons:
Gemfile.lockspecifiedactivesupport (7.0.7.2)which doesrequire "mutex_m", and that has moved fromstdlibto a bundled gem. Neweractivesupportdeclaresmutex_mas a dependency.Hash.new(…)being passed unrecognised keyword arguments, which we were mistakenly doing inspec/support/rspec_example_trace_helpers.rb.I've done a
bundle updatewhich moved theGemfile.lock(development/testing only) dependency toactivesupport (8.0.1). This doesn't affect the runtime dependencies; we're still aiming to support older Ruby / Rails etc.