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

Use local name when choosing enum variant based on element name #445

Merged
merged 1 commit into from
Jul 29, 2022
Merged

Use local name when choosing enum variant based on element name #445

merged 1 commit into from
Jul 29, 2022

Conversation

adamreichold
Copy link
Contributor

This is consistent to how struct fields are identified in MapAccess::next_key_seed as demonstrated by the two test cases.

@dralley dralley requested a review from Mingun July 28, 2022 21:36
Copy link
Collaborator

@Mingun Mingun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I working on correct deserializing of namespaced names, so this code will still be changed anyway. So it doesn't make much sense to change anything now, but I have no objections to the code

@adamreichold
Copy link
Contributor Author

I working on correct deserializing of namespaced names, so this code will still be changed anyway. So it doesn't make much sense to change anything now, but I have no objections to the code

I am very happy to here this as we currently need to use a different where namespacing does matter. Thank you for working on it!

However, I do suspect that will involve API changes? Maybe this change could be cherry-picked to be part of a 0.23.x maintenance release? Or do you consider it breaking as well as currently working code (albeit not really since one needs to match on the prefixes, not the namespaces themselves) will stop to do so?

@Mingun
Copy link
Collaborator

Mingun commented Jul 29, 2022

However, I do suspect that will involve API changes?

Yes, the way how you map fields to XML elements / attributes will be changed to be able to support namespaces regardless of the prefix used.

Maybe this change could be cherry-picked to be part of a 0.23.x maintenance release?

Some of our users depends on the 0.23 version, according to the lib.rs, and this change in a patch could break them (although, the information on that page does not contain a list of the features used, in principle, if we make sure that those dependent on 0.23 do not use the serialize feature, we could merge that to 0.23).

The other way -- we can merge this now and you could temporary depend on the git hash (anyway, master has a some significant improvements in the serde support).

@adamreichold
Copy link
Contributor Author

If there are reservations, merging it into the main branch seems preferable to me.

@Mingun
Copy link
Collaborator

Mingun commented Jul 29, 2022

One minor thing -- could you add a changelog entry? Although the implementation will still be changed, it is better that the changelog reflects all current changes if anyone else decides to use master until a release will be made

This is consistent to how struct fields are identified in
`MapAccess::next_key_seed` as demonstrated by the two test cases.
@adamreichold
Copy link
Contributor Author

adamreichold commented Jul 29, 2022

One minor thing -- could you add a changelog entry? Although the implementation will still be changed, it is better that the changelog reflects all current changes if anyone else decides to use master until a release will be made

Added an entry under the "Bug Fixes" heading.

@Mingun Mingun merged commit ad57bc2 into tafia:master Jul 29, 2022
@adamreichold adamreichold deleted the enum-tag-local-name branch July 29, 2022 15:55
@Mingun Mingun added bug serde Issues related to mapping from Rust types to XML namespaces Issues related to namespaces support labels Jul 29, 2022
@999eagle 999eagle mentioned this pull request Aug 1, 2022
Mingun added a commit to Mingun/quick-xml that referenced this pull request Aug 15, 2022
Mingun added a commit to Mingun/quick-xml that referenced this pull request Oct 28, 2023
The only usage was removed in 792d23d in tafia#445
Mingun added a commit to Mingun/quick-xml that referenced this pull request Oct 28, 2023
The only usage was removed in 792d23d in tafia#445
Mingun added a commit to Mingun/quick-xml that referenced this pull request Oct 28, 2023
The only usage was removed in 792d23d in tafia#445
Mingun added a commit to Mingun/quick-xml that referenced this pull request Nov 3, 2023
The only usage was removed in 792d23d in tafia#445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug namespaces Issues related to namespaces support serde Issues related to mapping from Rust types to XML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants