Nateckert / newton_rootfinder

Newton root-finding algorithm written in Rust
Apache License 2.0
7 stars 2 forks source link

Upgrade xml parser dependency #26

Open Nateckert opened 1 year ago

Nateckert commented 1 year ago

minidom v 0.12 is currently used as optional dependency. However, since that same version, the project decided to focus on XMPP: https://gitlab.com/xmpp-rs/xmpp-rs/-/blob/main/minidom/CHANGELOG.md see mention of Explicitely focus on XMPP. Some features will eventually be removed from the project to comply with this.

v 0.15 is out and we should see if we can upgrade to that version or change the xml parser dependency

Celeo commented 1 year ago

cargo t -F xml_config_file and cargo t -F xml_config --benches all pass after updating the dependency. Are there other tests or flows that I should run though?

Nateckert commented 1 year ago

Just open the PR and let the CI do the job !

Celeo commented 1 year ago

I'm not sure what I was seeing yesterday, but what I said above isn't true - upon updating the dependency version, the tests (with the xml_config_file) don't run successfully, citing XmlError(Xml(UnexpectedToken("at beginning of document", "Text", Some(["'<'", "'<?xml'"])))) errors.

Celeo commented 1 year ago

I tried loading XML documents with and without the <?xml> tag, including in a separate tiny project to rule out project-specific issues. I can't spot what the minidom crate actually wants here.

Nateckert commented 1 year ago

It might be the time to move to another xml parser (or change file format to yaml, although I do like the readability of xml as it is very compact: https://github.com/Nateckert/newton_rootfinder/blob/main/src/solver_n_dimensional/xml_parser/mod.rs#L16).

I'm going to look into the different options (now I'm tempted by https://github.com/RazrFalcon/roxmltree)