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

duplicate operations, arguments, and leases are allowed #9

Closed
bcantrill opened this issue Dec 23, 2021 · 1 comment · Fixed by #13
Closed

duplicate operations, arguments, and leases are allowed #9

bcantrill opened this issue Dec 23, 2021 · 1 comment · Fixed by #13

Comments

@bcantrill
Copy link
Contributor

Through a mismerge in an Idol file, I (accidentally) discovered that the Idolatry allowed duplicate operations and arguments. On the one hand, this is not surprising, as it is Serde's default behavior (with the last key winning), but it would also be be nice to prevent this -- this is certainly an error in the Idol file, and it can be hard to debug. Unfortunately, the normal mechanism for doing this -- namely. use serde_with and then the #[serde(with = "serde_with::rust::maps_duplicate_key_is_error")] annotation -- doesn't work for IndexMap. This calls for more Serde-fu than I currently possess!

@cbiffle
Copy link
Collaborator

cbiffle commented Dec 24, 2021

Huh, duplicate_key_is_error not working for IndexMap is disappointing. I'll look into alternatives there.

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

Successfully merging a pull request may close this issue.

2 participants