-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactor libXML error handling to remove global state #12663
Refactor libXML error handling to remove global state #12663
Conversation
libXML error handlers are now set right before calling a lib function collecting errors directly in that context. Afterwards the error handler is reset. There is no longer a global array collecting errors at `XML::Error.errors`.
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a sensible change, but it's also a breaking change. We need to discuss a path to incorporate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this sounds better, wdyt?
Co-authored-by: Beta Ziliani <[email protected]>
Hi, just letting you know this is a breaking change since the |
Good point! The detail to return |
This restores the original semantics prior to the refactoring of crystal-lang#12663
libXML error handlers are now set right before calling a lib function collecting errors directly in that context. Afterwards the error handler is reset. There is no longer a global array collecting errors at
XML::Error.errors
.The idea was sparked by @asterite in #12659 (comment), with explanation in #12659 (comment)
Resolves #12649
Closes #12652
Closes #12659