Repository navigation
fix(macros): resolve Schematic paths through core or gotcha - #117
Merged
Merged
Conversation
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.
#[derive(gotcha::Schematic)]currently fails in a downstream application unless it adds a directgotcha_coredependency and imports the trait. Resolve generated paths centrally through a direct core dependency or gotcha's core re-export, and qualify the generated trait reference.Schematicremains defined ingotcha_core. Libraries can implement or derive it using core alone, and their types satisfy the application's re-exported trait. The derive recognizes Cargo dependency renames and supports#[schematic(crate = "path::to::gotcha_core")]for custom facades. All schema generators and field metadata use the selected path; schema generation behavior is unchanged. Crate discovery adds a macro compilation dependency, with no new runtime work.Also re-export gotcha's existing validator crate. The documented single-dependency validation form uses
#[derive(gotcha::Validate)]with#[validate(crate = "gotcha::validator")]; the explicit upstream override is still required. Remove the direct core dev-dependency workaround and update the two compiler diagnostic snapshots whose displayed paths changed with the re-export.Validation:
15bab8ef0b4fdd7dc53483b37d386794480da5e8.The feature-documentation inconsistency reported in #87 was already corrected by #115. The unrelated standalone build failure when disabling gotcha's default
http1feature is tracked separately in #116.Fixes #87.