Emit code on duplicate struct & field attributes#64
Merged
sunshowers merged 5 commits intooxidecomputer:mainfrom Apr 1, 2025
Merged
Emit code on duplicate struct & field attributes#64sunshowers merged 5 commits intooxidecomputer:mainfrom
sunshowers merged 5 commits intooxidecomputer:mainfrom
Conversation
Changes the existing internal concept of "error" into a "critical error" without adding any new behavior.
A warning error does not propagate "has_critical_error" to the parent. It does not prevent forward progress
Removing duplicate attributes won't change the code emitted, we can confidently write an impl + the error. Similar to how the current macro emits an impl + errors when the `leaf` attribute is used on an enum (as it can have no effect on the generated code).
Removing duplicate attributes won't change the code emitted, we can confidently write an impl + the error. Similar to how the current macro emits an impl + errors when the `leaf` attribute is used on an enum (as it can have no effect on the generated code).
Collaborator
|
Looks great, thanks! |
Collaborator
|
This is now out in daft 0.1.3. Thanks again! |
Contributor
Author
|
Yay! I'm glad this worked out! Thanks for the review and for talking about this stuff on the podcast |
SamusAranX
pushed a commit
to AdmitCheck/daft-serialize
that referenced
this pull request
Nov 17, 2025
Removing duplicate attributes won't change the code emitted, we can confidently write an impl + the error. Similar to how the current macro emits an impl + errors when the `leaf` attribute is used on an enum (as it can have no effect on the generated code).
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.
Removing duplicate attributes won't change the code emitted, we can confidently write an impl + the error. Similar to how the current macro emits an impl + errors when the
leafattribute is used on an enum (as it can have no effect on the generated code).This is an alternative to #63 that introduces the concept of "critical" and "warning" errors inside of the
ErrorSink. The implementation of this is documented in individual ordered commits on this PR.