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

Add Ruby 3.3 to test matrix #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Jan 25, 2024

3.3 is actually broken with the following error:

rake aborted!
ArgumentError: wrong number of arguments (given 3, expected 1..2) (ArgumentError)

  USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z", nil, 'n')
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jfrey/.gem/ruby/3.3.0/gems/soap4r-ng-2.0.4/lib/xsd/charset.rb:133:in `initialize'
/Users/jfrey/.gem/ruby/3.3.0/gems/soap4r-ng-2.0.4/lib/xsd/charset.rb:133:in `new'
/Users/jfrey/.gem/ruby/3.3.0/gems/soap4r-ng-2.0.4/lib/xsd/charset.rb:133:in `<module:Charset>'
/Users/jfrey/.gem/ruby/3.3.0/gems/soap4r-ng-2.0.4/lib/xsd/charset.rb:13:in `<module:XSD>'
/Users/jfrey/.gem/ruby/3.3.0/gems/soap4r-ng-2.0.4/lib/xsd/charset.rb:10:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.0/gems/soap4r-ng-2.0.4/lib/wsdl/parser.rb:11:in `<top (required)>'
/Users/jfrey/dev/rbvmomi2/lib/tasks/vmodl_helper.rb:6:in `<top (required)>'
lib/tasks/vmodl.rake:3:in `require_relative'
lib/tasks/vmodl.rake:3:in `<top (required)>'
/Users/jfrey/dev/rbvmomi2/Rakefile:10:in `load'
/Users/jfrey/dev/rbvmomi2/Rakefile:10:in `block in <top (required)>'
/Users/jfrey/dev/rbvmomi2/Rakefile:10:in `each'
/Users/jfrey/dev/rbvmomi2/Rakefile:10:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/cli/exec.rb:58:in `load'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/cli/exec.rb:58:in `kernel_load'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/cli/exec.rb:23:in `run'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/cli.rb:451:in `exec'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/cli.rb:34:in `dispatch'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/cli.rb:28:in `start'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/exe/bundle:28:in `block in <top (required)>'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/Users/jfrey/.gem/ruby/3.3.0/gems/bundler-2.5.5/exe/bundle:20:in `<top (required)>'
/Users/jfrey/.rubies/ruby-3.3.0/bin/bundle:25:in `load'
/Users/jfrey/.rubies/ruby-3.3.0/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)

From what I can see, soap4r-ng is the problem, however, strangely, I have no idea what it's intention was. See https://github.com/rubyjedi/soap4r/blob/master/lib/xsd/charset.rb#L133. (Aside, note that the README says the gem is unmaintained ☹️).

Looking at the blame it was


The interface for Regexp is the following for Ruby 3.2.3 and 3.3.0:

new(string, options = 0, timeout: nil) → regexp
new(regexp, timeout: nil) → regexp 

and is the following for Ruby 3.1.4, 3.0.6, 2.7.8, 2.6.10, and 2.5.9

new(string, [options]) → regexp
new(regexp) → regexp

The code in question is

USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z", nil, 'n')

so I have no idea what that 3rd parameter is supposed to be (I assume some older Ruby thing, but I'm having trouble finding docs)

@agrare
Copy link
Member

agrare commented Jan 25, 2024

From what I can see, soap4r-ng is the problem, however, strangely, I have no idea what it's intention was. See https://github.com/rubyjedi/soap4r/blob/master/lib/xsd/charset.rb#L133. (Aside, note that the README says the gem is unmaintained ☹️).

This is why I dislike -ng, what do we do now, next-next-gen?

@agrare
Copy link
Member

agrare commented Jan 25, 2024

It looks like the third option was "lang" and "N" meant "no encoding ruby/ruby@f65aac7

@agrare
Copy link
Member

agrare commented Jan 25, 2024

It looks like the right way to call this now is Regexp.new('foo', Regexp::NOENCODING) per ruby/ruby@7e8fa06

@Fryguy
Copy link
Member Author

Fryguy commented Jan 25, 2024

Oh great find!

Support for the 3rd argument will be removed after the release of Ruby 3.2.

And that explains why it just started happening with 3.3

@agrare
Copy link
Member

agrare commented Jan 25, 2024

rubyjedi/soap4r#27

@micwoj92
Copy link

FYI the PR in soap4r got accepted and upstream author said that there will be new version released with this fix included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants