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

Always call LibXML.xmlInitParser when requiring XML libraries #14191

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Jan 9, 2024

This may fix #10365. I need more confirmation from macOS users.

libxml2 used to have a lot of different initialization functions, and will usually call one of them itself when a client calls any XML function. My guess is those initializations by libxml2 weren't enough in older versions (this is probably why all of them except xmlInitParser are deprecated nowadays).

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

This seems like a decent change, regardless of whether it fixes the macOS issues.

@straight-shoota straight-shoota added this to the 1.12.0 milestone Jan 9, 2024
@HertzDevil HertzDevil changed the title Always call LibXML.xmlInitParser when requiring XML files Always call LibXML.xmlInitParser when requiring XML libraries Jan 9, 2024
@beta-ziliani
Copy link
Member

I confirm this solves the issue with macOS own libXML 👏
Thanks Quinton!

@straight-shoota straight-shoota merged commit 06f2f82 into crystal-lang:master Jan 12, 2024
56 checks passed
@HertzDevil HertzDevil deleted the bug/libxml2-init branch January 26, 2024 22:50
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.

XML to_s error
3 participants