Drop saxmerl; parse CLDR XML with sweet_xml#3
Merged
Conversation
saxmerl (unmaintained since 2021) fails to compile on Erlang/OTP 27+: its application/0 omits :xmerl, so Record.extract(from_lib: "xmerl/include/xmerl.hrl") can no longer resolve the header now that xmerl is not implicitly on the compile-time code path. sweet_xml is already a dependency and provides both parsing and the xpath queries we use, so drop saxmerl entirely. The two parse_xml/1 helpers now call SweetXml.parse/2 with a no-op fetch_fun to skip DTD fetching: the CLDR documents carry a SYSTEM DOCTYPE that :xmerl_scan would otherwise try to read off disk and crash on (saxy ignored DTDs). Also bump ssl_verify_fun 1.1.6 -> 1.1.7; 1.1.6 fails to compile on OTP 27 (record 'Extension' undefined).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
saxmerl(unmaintained since 2021) fails to compile on Erlang/OTP 27+. Itsapplication/0omits:xmerl, soRecord.extract(from_lib: "xmerl/include/xmerl.hrl")can no longer resolve the header now thatxmerlisn't implicitly on the compile-time code path. This blocks zonex (and any consumer) on the Elixir 1.20 / OTP 27 toolchain.What
saxmerl—sweet_xmlis already a dependency and provides both parsing and thexpathqueries we use. The twoparse_xml/1helpers now callSweetXml.parse/2.fetch_fun. The CLDR documents carry aSYSTEMDOCTYPE that:xmerl_scanwould otherwise try to read off disk, crashing with:enoent(saxy silently ignored DTDs). The existingxpath(~x"…")queries are unchanged.ssl_verify_fun1.1.6 → 1.1.7 — 1.1.6 fails to compile on OTP 27 (record 'Extension' undefined).Testing
Full suite passes on Elixir 1.20.1 / OTP 27.3.4.13:
19 passed (2 doctests, 17 tests).