Skip to content
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

Regression : Fix xml-rs depencency version in Cargo.toml #206

Open
Azel-ytof opened this issue Jun 27, 2023 · 0 comments
Open

Regression : Fix xml-rs depencency version in Cargo.toml #206

Azel-ytof opened this issue Jun 27, 2023 · 0 comments

Comments

@Azel-ytof
Copy link

Azel-ytof commented Jun 27, 2023

Hi,

My application (since 1 year) use your lib - and thank you a lot for your work !
But I have face a problem...
My last published version works fine, but my WIP version has encoding problems.
I think that is because of encoding_rs but when I put logs to see where it comes from, this is your crate (not directly).

In fact, I have done a cargo tree comparison between my two versions, and I have see these differences (for v0.5.1) :

My prod version :

serde-xml-rs v0.5.1
├── log v0.4.17 (*)
├── serde v1.0.156 (*)
├── thiserror v1.0.39 (*)
└── xml-rs v0.8.4

My WIP version :

serde-xml-rs v0.5.1
├── log v0.4.19 (*)
├── serde v1.0.164 (*)
├── thiserror v1.0.40 (*)
└── xml-rs v0.8.14

The problem here is that xml-rs do not have the same version, and that cause for me encoding problem (because some XML are decoded in WINDOWS-1252 by the encoding_rs crate but when I parse the decoded string with your crate, I face an encoding problem).

So I think it may be usefull to fix the xml-rs version in your Cargo.toml to avoid some error like this one.

FIY, here is my code (if I do something bad and that's not from the crate version problem) :

#[derive(Debug, Deserialize)]
pub struct ListePa {
    #[serde(rename = "BIEN")]
    pub biens: Option<Vec<Bien>>,
}

fn parse_ac3(
    &self,
    content: String,
) -> Result<(), ErrorEntity> {
    // logging 'content' here has no encoding problem (decoded in a previous function)
    let parsing_result: Result<ac3::ListePa, serde_xml_rs::Error> =
        serde_xml_rs::from_str(&content);
    // logging 'parsing_result' here has encoding problem
    // ...... Some additionnal process ......
}

And the workaround wiating for your response :
cargo update -p xml-rs --precise 0.8.4

At your disposition if you need more informations :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant