Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 24, 2025

Bumps ruby/setup-ruby from 1.222.0 to 1.227.0.

Release notes

Sourced from ruby/setup-ruby's releases.

v1.227.0

What's Changed

Full Changelog: ruby/setup-ruby@v1.226.0...v1.227.0

v1.226.0

What's Changed

Full Changelog: ruby/setup-ruby@v1.225.0...v1.226.0

v1.225.0

What's Changed

Full Changelog: ruby/setup-ruby@v1.224.0...v1.225.0

v1.224.0

Full Changelog: ruby/setup-ruby@v1.223.0...v1.224.0

v1.223.0

What's Changed

New Contributors

Full Changelog: ruby/setup-ruby@v1.222.0...v1.223.0

Commits
  • 1a61595 Add truffleruby-24.2.0,truffleruby+graalvm-24.2.0
  • 922ebc4 Use $JAVA_HOME/bin/java for the check
  • 6c79f72 Test successful JRuby start without using launcher
  • e17c5ea Handle exec error
  • f0a4d6b Switch JAVA_HOME to 21 for JRuby (#721)
  • bbda858 Fix .tool-versions and mise.toml tests
  • 30755d8 Cleanup matching for .tool-versions and mise and add tests for .ruby-version ...
  • 28233a0 bugfix: Fix bug that version cannot be parsed in .tool-versions
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.222.0 to 1.227.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](ruby/setup-ruby@277ba2a...1a61595)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Mar 24, 2025
@hsbt
Copy link
Member

hsbt commented Mar 24, 2025

@headius Can you look this failure?

https://github.com/ruby/rake/actions/runs/14029508755/job/39274018938?pr=619#step:5:11

Error: test_display_exception_details_bad_encoding(TestRakeApplication): Java::JavaLang::RuntimeException: org.jruby.exceptions.EncodingError$CompatibilityError: (CompatibilityError) incompatible encodings: US-ASCII and UTF-8

@headius
Copy link

headius commented Mar 24, 2025

@hsbt I will investigate!

@headius
Copy link

headius commented Mar 24, 2025

The root cause appears to be a rake test that raises with a US-ASCII string that actually has UTF-8 MBC in it, like this:

$ jruby -rstringio -e 'begin; raise "ñ".dup.force_encoding("US-ASCII"); end'
RuntimeError: ��

That error's message gets reported via a StringIO in the "trace" logic in Rake, and StringIO eventually calls the equivalent of rb_str_buf_append which does not like that broken message.

@headius
Copy link

headius commented Mar 24, 2025

Working on it now: jruby/jruby#8710

headius added a commit to headius/stringio that referenced this pull request Mar 24, 2025
We expect exceptions from catString, so just re-raise directly.

This caused the ugly internal RuntimeException trace in
ruby/rake#619. This does not fix that issue, but it properly lets
the original Ruby exception propagate.
headius added a commit to headius/stringio that referenced this pull request Mar 24, 2025
We expect exceptions from catString, so just re-raise directly.

This caused the ugly internal RuntimeException trace in
ruby/rake#619. This does not fix that issue, but it properly lets
the original Ruby exception propagate.
@headius
Copy link

headius commented Mar 24, 2025

@hsbt The "fix" feels kinda hacky, because only minor changes are required to cause CRuby to fail the same way.

The fix was to make JRuby's backtrace elements have a code range of 7BIT when they can be 7BIT, rather than defaulting to VALID: jruby/jruby#8711

The explanation of why this fixes the problem, and why the test is very fragile: jruby/jruby#8710 (comment)

Basically, it's easy to make CRuby also fail this just by checking rake out into a path with MBC characters:

[] råke $ pwd
/Users/headius/work/råke
[] råke $ cx 3.4 bundle exec rake test
/Users/headius/.rubies/ruby-3.4.1/bin/ruby -w -I"lib:test" /Users/headius/work/råke/lib/rake/rake_test_loader.rb "test/test_private_reader.rb" "test/test_rake.rb" "test/test_rake_application.rb" "test/test_rake_application_options.rb" "test/test_rake_backtrace.rb" "test/test_rake_clean.rb" "test/test_rake_cpu_counter.rb" "test/test_rake_definitions.rb" "test/test_rake_directory_task.rb" "test/test_rake_dsl.rb" "test/test_rake_early_time.rb" "test/test_rake_extension.rb" "test/test_rake_file_creation_task.rb" "test/test_rake_file_list.rb" "test/test_rake_file_list_path_map.rb" "test/test_rake_file_task.rb" "test/test_rake_file_utils.rb" "test/test_rake_functional.rb" "test/test_rake_invocation_chain.rb" "test/test_rake_late_time.rb" "test/test_rake_linked_list.rb" "test/test_rake_makefile_loader.rb" "test/test_rake_multi_task.rb" "test/test_rake_name_space.rb" "test/test_rake_package_task.rb" "test/test_rake_path_map.rb" "test/test_rake_path_map_explode.rb" "test/test_rake_path_map_partial.rb" "test/test_rake_pseudo_status.rb" "test/test_rake_rake_test_loader.rb" "test/test_rake_reduce_compat.rb" "test/test_rake_require.rb" "test/test_rake_rules.rb" "test/test_rake_scope.rb" "test/test_rake_task.rb" "test/test_rake_task_argument_parsing.rb" "test/test_rake_task_arguments.rb" "test/test_rake_task_manager.rb" "test/test_rake_task_manager_argument_resolution.rb" "test/test_rake_task_with_arguments.rb" "test/test_rake_test_task.rb" "test/test_rake_thread_pool.rb" "test/test_rake_top_level_functions.rb" "test/test_rake_win32.rb" "test/test_thread_history_display.rb" "test/test_trace_output.rb" 
Loaded suite /Users/headius/work/råke/lib/rake/rake_test_loader
Started
E
============================================================================================================================================================================================================================================================================================================================
Error: test_display_exception_details_bad_encoding(TestRakeApplication): Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-8
/Users/headius/work/råke/lib/rake/trace_output.rb:20:in 'StringIO#write'
/Users/headius/work/råke/lib/rake/trace_output.rb:20:in 'IO::generic_writable#print'
/Users/headius/work/råke/lib/rake/trace_output.rb:20:in 'Rake::TraceOutput#trace_on'
/Users/headius/work/råke/lib/rake/application.rb:420:in 'Rake::Application#trace'
/Users/headius/work/råke/lib/rake/application.rb:279:in 'Rake::Application#display_exception_backtrace'
/Users/headius/work/råke/lib/rake/application.rb:246:in 'Rake::Application#display_exception_details'
/Users/headius/work/råke/lib/rake/application.rb:236:in 'Rake::Application#display_error_message'
/Users/headius/work/råke/test/test_rake_application.rb:97:in 'block in TestRakeApplication#test_display_exception_details_bad_encoding'
      94:     out, err = capture_output do
      95:       @app.set_default_options # reset trace output IO
      96: 
  =>  97:       @app.display_error_message ex
      98:     end
      99: 
     100:     assert_empty out
/Users/headius/work/råke/test/test_rake_application.rb:94:in 'TestRakeApplication#test_display_exception_details_bad_encoding'
============================================================================================================================================================================================================================================================================================================================
Finished in 12.340623 seconds.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
597 tests, 1458 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
99.8325% passed
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
48.38 tests/s, 118.15 assertions/s

I'm not sure this test is actually useful, since it only passes under a very specific set of circumstances. Nevertheless, I have fixed JRuby and found a few other small fixes for StringIO (ruby/stringio#124).

@nobu @byroot you may have some thoughts here too...

@headius
Copy link

headius commented Mar 24, 2025

@hsbt I have pushed a new snapshot of JRuby 10 and a new release of jruby-head for Ruby installers. These tests should pass now.

headius added a commit to ruby/stringio that referenced this pull request Mar 24, 2025
We expect exceptions from catString, so just re-raise directly.

This caused the ugly internal RuntimeException trace in
ruby/rake#619. This does not fix that issue, but it properly lets
the original Ruby exception propagate.
@hsbt hsbt merged commit e1a7c81 into master Mar 25, 2025
57 of 58 checks passed
@hsbt hsbt deleted the dependabot/github_actions/ruby/setup-ruby-1.227.0 branch March 25, 2025 02:33
@hsbt
Copy link
Member

hsbt commented Mar 25, 2025

@headius Thanks. I confirmed with jruby-head

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants