Skip to content

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).

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:serialization platform:darwin labels Jan 9, 2024
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
@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

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:darwin topic:stdlib:serialization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XML to_s error

3 participants