feat: improve serde-shape release readiness - #10
Merged
Conversation
Why: str and slice types already implement the shape traits, and the graph constructors already accept ?Sized types. The convenience methods nevertheless imposed a Sized bound, forcing users of those built-ins onto the lower-level graph API for no semantic reason. Signed-off-by: tison <wander4096@gmail.com>
Why: inspecting a derived struct or enum required callers to match the root ShapeRef, copy its ShapeId, and perform a separate lookup. That ceremony dominated every introductory example and made the common case feel lower-level than it is. Signed-off-by: tison <wander4096@gmail.com>
Why: IP and socket address value types live in core::net on the supported Rust versions, but their shape implementations were needlessly hidden behind the std feature. That prevented no_std configuration models from reflecting common listen and peer addresses. Signed-off-by: tison <wander4096@gmail.com>
Why: a generic custom shape hook can require T: SerializeShape or T: DeserializeShape, but the derive cannot infer arbitrary function signatures. Without a directional bound override, users had to leak reflection-only constraints into the business type declaration or could not compile the hook at all. Signed-off-by: tison <wander4096@gmail.com>
Why: the README compared serde-shape to another project with claims it could not substantiate, implied custom Serde code was always opaque despite the hook API, and did not warn consumers that recursive definition edges require cycle detection. Signed-off-by: tison <wander4096@gmail.com>
Why: the license text is maintained by the Apache Software Foundation, so the project documentation should not depend on a repository branch URL merely to identify the Apache 2.0 license. Signed-off-by: tison <wander4096@gmail.com>
Why: the two end-to-end tests only need to prove that reflected paths can edit internally tagged TOML, but the fixture had grown a second 400-line schema interpreter for value kinds, optionality, and conditions. Most of those policies were untested and are downstream concerns, making the test harder to trust and review. Signed-off-by: tison <wander4096@gmail.com>
Why: syn renders qualified paths such as crate::defaults with spaces around punctuation. Exposing that rendering through DefaultShape::Path made path metadata inconsistent with the custom-function metadata and awkward for tools that compare or display it. Signed-off-by: tison <wander4096@gmail.com>
Why: cargo package writes normalized manifests under target/package, and the existing exclude pattern matched only the target directory entry rather than its descendants. Running the documented lint workflow after a package check therefore failed on Cargo-generated files. 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.
What changed
no_stdthroughcore::netcargo packageReview structure
Each concern is an independent signed commit. Every commit message includes a
Why:paragraph so it can be reviewed without reconstructing the motivation from the full diff.Validation
cargo x lintcargo x testrustup run 1.85.0 cargo x testcargo x build --lockedthumbv7em-none-eabihfcargo package -p serde-shape-derive --lockedcargo package -p serde-shape --lockedcargo semver-checks check-release -p serde-shape --baseline-rev origin/main --release-type patch --all-featuresRelease note
This branch adds no semver violations relative to
main. The already-merged redesign in #9 is intentionally incompatible with the published0.0.1, so the next release still needs the corresponding breaking-version bump.