Skip to content

Fix MRI Ruby vs. JRuby XML child namespace output differences #3456

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

Merged
merged 18 commits into from
Mar 9, 2025

Conversation

johnnyshields
Copy link
Contributor

Fixes #3455

@johnnyshields
Copy link
Contributor Author

@flavorjones please approve CI, thanks!

@flavorjones
Copy link
Member

I'm not opposed to this approach. I'm wondering if the namespace stack should be managed in the getAttrsAndNamespaces() function, though, since that's already managing one namespace stack (for canonicalized output). WDYT?

@johnnyshields
Copy link
Contributor Author

@flavorjones I think you're right, I'll look more into getAttrsAndNamespaces tomorrow

@flavorjones
Copy link
Member

flavorjones commented Mar 8, 2025

Thank you so much for diving in and drafting this pull request! I sincerely wish there were more folks like you, who are willing to contribute to the JRuby implementation. ❤️

@johnnyshields
Copy link
Contributor Author

@flavorjones code is ready for a review. What is the best way to test this? Are there instructions on how to build JRuby locally?

@flavorjones
Copy link
Member

flavorjones commented Mar 8, 2025

@johnnyshields Existing "how to contribute" docs are at https://github.com/sparklemotion/nokogiri/blob/main/CONTRIBUTING.md

but the TLDR is bundle install && bundle exec rake compile test

@johnnyshields
Copy link
Contributor Author

johnnyshields commented Mar 9, 2025

@flavorjones This is ready for final review.

While testing I found two separate issue unrelated to this PR:

Copy link
Member

@flavorjones flavorjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the thorough test coverage! ❤️

@johnnyshields
Copy link
Contributor Author

@flavorjones all comments are addressed, please check.

Copy link
Member

@flavorjones flavorjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, will merge if the test suite passes.

@flavorjones flavorjones merged commit babd976 into sparklemotion:main Mar 9, 2025
144 checks passed
@flavorjones
Copy link
Member

Will get this into a bugfix release soon. But first I'd like to see if I can easily fix the other bugs we're finding and get them in, too.

@johnnyshields
Copy link
Contributor Author

@flavorjones awesome, I really appreciate it!

@flavorjones
Copy link
Member

@johnnyshields I really appreciate you digging in and fixing this!

@flavorjones
Copy link
Member

Side note: I'm integration testing Nokogiri main against ruby-saml main in the "downstream" workflow (e.g. https://github.com/sparklemotion/nokogiri/actions/runs/13752072852/job/38454295028).

Should I be testing ruby-saml with JRuby as well, do you think? You're obviously finding edge cases that nobody else has in 15+ years so it might be worthwhile ...

@johnnyshields
Copy link
Contributor Author

johnnyshields commented Mar 10, 2025

@flavorjones yes, please test JRuby and TruffleRuby for RubySaml if possible 🙏

@flavorjones
Copy link
Member

See #3465 for CI coverage

@pitbulk
Copy link

pitbulk commented Mar 18, 2025

Great work here!

flavorjones added a commit that referenced this pull request Mar 19, 2025
…rt v1.18x) (#3476)

**What problem is this PR intended to solve?**

Fix MRI Ruby vs. JRuby XML child namespace output differences

Fixes #3455

Backport of #3456

cc @johnnyshields
@flavorjones flavorjones added this to the v1.18.x patch releases milestone Jul 11, 2025
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.

MRI Ruby vs. JRuby XML child namespace output differences
3 participants