Re: XML test error on Arch Linux
От | Erik Wienhold |
---|---|
Тема | Re: XML test error on Arch Linux |
Дата | |
Msg-id | 54124c04-1b08-4f7e-8a22-a41a718f7ae5@ewie.name обсуждение исходный текст |
Ответ на | Re: XML test error on Arch Linux (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: XML test error on Arch Linux
|
Список | pgsql-hackers |
On 2024-07-06 16:25 +0200, Tom Lane wrote: > Erik Wienhold <ewie@ewie.name> writes: > > So, there must be breaking changes in 2.13.0: > > https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.0 > > Yeah, apparently --- I get what look like the same diffs with > libxml2 2.13.0 recently supplied by MacPorts. Grumble. > Somebody's going to have to look into that. Here's a patch that fixes just the xmlserialize and namespace errors. Use xmlAddChildList instead of xmlAddChild for xmlserialize. That also works with 2.12.7, but I don't know about older libxml2 versions. Maybe add a version check to be safe: #if LIBXML_VERSION >= 21300 xmlAddChildList(root, content_nodes); #else xmlAddChild(root, content_nodes); #endif I don't know if using xmlAddChild in this context was ever correct. The namespace errors are tricky because xmlParseBalancedChunkMemory now returns res_code != 0 for invalid or unknown namespaces (probably other errors as well). So I just added an additional check to ignore those errors for >=2.13. But that's rather hackish. I don't know how to handle it in xml_errorHandler where those error codes are already dealt with in order to compensate for differences in error reporting across different libxml2 versions. Looks like xmlerrcxt is ignored by xmlParseBalancedChunkMemory. No idea how to deal with the remaining errors for invalid and undefined entities which appear to include less details now. That seems to be expected, judging from the release notes: > A few error messages were improved and consolidated. Please update > downstream test suites accordingly. How to deal with that in a manner that still works for pre-2.13, other than filtering out those details that are no longer included in 2.13? Or just \set VERBOSITY terse for those few test cases? But that omits the entire error detail. -- Erik
Вложения
В списке pgsql-hackers по дате отправления: