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

Address Rails::Command::HelpIntegrationTest failure against ruby 3.4.0dev #51537

Merged
merged 1 commit into from Apr 10, 2024

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Apr 10, 2024

Motivation / Background

This commit addresses Rails Nightly CI failure at https://buildkite.com/rails/rails-nightly/builds/391#018ec54f-a2ef-40de-9749-6cc3ecae4ebd/1368-1376

Detail

$ ruby -v
ruby 3.4.0dev (2024-04-09T16:29:01Z master 0107954f25) [x86_64-linux]
$ bin/test test/command/help_integration_test.rb:33
Run options: --seed 3363

F

Failure:
Rails::Command::HelpIntegrationTest#test_prints_help_via_`X:help`_command_when_running_`X`_and_`X:X`_command_is_not_defined [test/command/help_integration_test.rb:37]:
--- expected
+++ actual
@@ -1,4 +1,5 @@
-"Commands:
+"/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.
+Commands:
   bin/rails dev:cache           # Toggle development mode caching on/off
   bin/rails dev:help [COMMAND]  # Describe available commands or one specific...

bin/test test/command/help_integration_test.rb:33

Finished in 0.738986s, 1.3532 runs/s, 1.3532 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
$

Additional information

This commit can be reverted once both rack and jbuilder take care of it.

Related to
rack/rack#2166
rails/jbuilder#561

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

…4.0dev

This commit addresses Rails Nightly CI failure
at https://buildkite.com/rails/rails-nightly/builds/391#018ec54f-a2ef-40de-9749-6cc3ecae4ebd/1368-1376

```ruby
$ ruby -v
ruby 3.4.0dev (2024-04-09T16:29:01Z master 0107954f25) [x86_64-linux]
$ bin/test test/command/help_integration_test.rb:33
Run options: --seed 3363

F

Failure:
Rails::Command::HelpIntegrationTest#test_prints_help_via_`X:help`_command_when_running_`X`_and_`X:X`_command_is_not_defined [test/command/help_integration_test.rb:37]:
--- expected
+++ actual
@@ -1,4 +1,5 @@
-"Commands:
+"/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.
+Commands:
   bin/rails dev:cache           # Toggle development mode caching on/off
   bin/rails dev:help [COMMAND]  # Describe available commands or one specific...

bin/test test/command/help_integration_test.rb:33

Finished in 0.738986s, 1.3532 runs/s, 1.3532 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
$
```

This commit can be reverted once both rack and jbuilder take care of it.

Related to
rack/rack#2166
rails/jbuilder#561
@rails-bot rails-bot bot added the railties label Apr 10, 2024
@yahonda
Copy link
Member Author

yahonda commented Apr 10, 2024

Here are the sample repository to show which gem actually requires ostruct.

$ git clone https://github.com/yahonda/diag391
$ cd diag391/
$ bundle install
$ bin/rails dev
$ ruby -v
ruby 3.4.0dev (2024-04-09T16:29:01Z master 0107954f25) [x86_64-linux]
$ bin/rails dev
"/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/gems/jbuilder-2.11.5/lib/jbuilder.rb:7:in '<top (required)>'"
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/bundler/gems/zeitwerk-dd07889c9c40/lib/zeitwerk/kernel.rb:35: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.
"/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/gems/rack-3.0.10/lib/rack/show_exceptions.rb:3:in '<top (required)>'"
Commands:
  bin/rails dev:cache           # Toggle development mode caching on/off
  bin/rails dev:help [COMMAND]  # Describe available commands or one specific command

@yahonda yahonda merged commit 50a3bf7 into rails:main Apr 10, 2024
4 checks passed
@yahonda yahonda deleted the diag_rails_nightly_391 branch April 19, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant