-
Notifications
You must be signed in to change notification settings - Fork 58
bump newtype-uuid to 1.3.1, use automatic replacement #9122
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
bump newtype-uuid to 1.3.1, use automatic replacement #9122
Conversation
Created using spr 1.3.6-beta.1
"MupdateUuid": { | ||
"x-rust-type": { | ||
"crate": "omicron-uuid-kinds", | ||
"path": "omicron_uuid_kinds::MupdateUuid", | ||
"version": "*" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types are much more reasonably named now as well (they use the same type alias as the one defined in uuid-kinds).
settings = { | ||
attrs = [#[derive(Diffable)]], | ||
schemars08 = { | ||
attrs = [#[cfg(feature = "schemars08")]], | ||
rust_type = { | ||
crate = "omicron-uuid-kinds", | ||
version = "*", | ||
path = "omicron_uuid_kinds", | ||
}, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the x-rust-type magic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
"TypedUuidForOmicronZoneKind": { | ||
"OmicronZoneUuid": { | ||
"type": "string", | ||
"format": "uuid" | ||
"format": "uuid", | ||
"x-rust-type": { | ||
"crate": "omicron-uuid-kinds", | ||
"path": "omicron_uuid_kinds::OmicronZoneUuid", | ||
"version": "*" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that this change is identical on the wire, so there aren't any compatibility concerns.
Created using spr 1.3.6-beta.1
You never have to
replace
anyTypedUuidForFooKind
types again! Also acts as a good test for wire-compatibility checking with drift.Also bumped all the versioned APIs to pick up the x-rust-type change, so that clients work with automatic replacement.