-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: use
parse-display
instead of serde
To ensure enum string representations are consistent with their variant names we want to derive the string handling (`Display`/`FromStr`). We've so far used the somewhat convoluted approach of deriving `serde::{Deserialize, Serialize}` and using `serde_plain`'s proc macros to generate implementations of `Display` and `FromStr` that forward to `serde`, but this puts quite a lot in the public API for each enum that we don't really want: - `serde::Deserialize` - `serde::Serialize` - `serde_plain::Error` `parse-display` is another derive macro the specifically generates a `Display` and corresponding `FromStr` implementation. It still leaks an error type into the API but this is only one thing instead of 3. BREAKING CHANGE: `Capability`, `ChangeSetStatus`, `ResourceStatus`, `StackStatus`, `change_set::Evaluation`, `change_set::ExecutionStatus`, `change_set::ModifyScope`, `change_set::Replacement`, and `change_set::RequiresRecreation` no longer implement `serde::{Deserialize, Serialize}`, and their `FromStr` implementations now use `parse_display::ParseError` as the `Err` type.
- Loading branch information
Showing
5 changed files
with
44 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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