-
-
Notifications
You must be signed in to change notification settings - Fork 902
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
Change XmlNodeSet#to_a return type to RubyArray #1969
Conversation
The existing signature conflicts with one added to JRuby 9.2.9. Specifically, the new signature in JRuby returns RubyArray, which causes a compilation error on this line in Nokogiri because it attempts to use a more general return type. We would prefer to keep the specific return type in JRuby. * If we patch JRuby, then 9.2.9 will never be able to compile any version of Nokogiri. * If we patch Nokogiri, all versions of JRuby can compile current and future Nokogiri. Versions prior to 9.2.9 will be able to compile all existing releases of Nokogiri. I do not believe the change in 9.2.9 breaks anything at runtime, since the JVM does not care about this particular return type mismatch unless someone actually returns a non-RubyArray object. Fixes sparklemotion#1968
The changes look good to me. I don't think the failures are related to the change. The failure was in the MRI valgrind tests. I am waiting to see the tests pass before I merge the PR. |
Yeah, looks like some optimizations were backported to ruby 2.5, so I just added a valgrind suppression and will kick off again. |
@headius I see you based this commit on the I'm not totally familiar with the JRuby 9.2.9 change that is driving this commit, but am I to understand that you're requesting a bug fix release in the v1.10.x series? |
Remaining CI failure is due to #1971, looking into it. We could merge this PR, but I'd like to leave it open for a bit so I can ensure the CI job is stable. |
@flavorjones In JRuby 9.2.8, the only So the addition of the new This fix should go into any active Nokogiri branches going forward. I did not do the PR against master because it appear to be behind the branch. |
@headius Going forward please submit PRs based on |
Merged manually onto master. Will be in v1.11.0. Thank so much, @headius! |
Side note: this actually went out in v1.10.9, see https://my.diffend.io/gems/nokogiri/1.10.8-java/1.10.9-java |
A suggestion: put this in the project PR template, perhaps? Thanks for merge and release! |
The existing signature conflicts with one added to JRuby 9.2.9.
Specifically, the new signature in JRuby returns RubyArray, which
causes a compilation error on this line in Nokogiri because it
attempts to use a more general return type.
We would prefer to keep the specific return type in JRuby.
version of Nokogiri.
and future Nokogiri. Versions prior to 9.2.9 will be able to
compile all existing releases of Nokogiri.
I do not believe the change in 9.2.9 breaks anything at runtime,
since the JVM does not care about this particular return type
mismatch unless someone actually returns a non-RubyArray object.
Fixes #1968