fix: align reflected shapes with Serde behavior - #8
Merged
Conversation
Signed-off-by: tison <wander4096@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
serde-shapedependenciestype_nameas a unique keyResult,Duration, and tuples through Serde's arity 16, with a documented support matrixDesign notes
std::nettypes use the existingShapeRef::Unionmodel rather than introducing a serializer-format context. Their string and compact enum/array/tuple forms are both visible to format-agnostic consumers.Named definitions now use
TypeIdof the stable builder closure as their source identity, with the Rust type name retained as a specialization and diagnostic value. This prevents same-named types from different crate instances from being silently merged. The builder is consequently required to be'static.The derive compile fixture intentionally depends on
serde-shapethrough a renamed Cargo dependency. Serde token tests record the readable and compact calls for byte slices and network types.This PR does not add description/doc-comment metadata, a generic graph walker, or field-level shape override attributes; those are independent feature designs rather than correctness fixes. Unsupported foreign types remain addressable through documented local newtypes and manual shape implementations.
Validation
cargo x build --lockedcargo x testcargo x lint