docs(types): record that the codec macros must precede the mod declarations - #303
Open
mehmetkr-31 wants to merge 1 commit into
Open
docs(types): record that the codec macros must precede the mod declarations#303mehmetkr-31 wants to merge 1 commit into
mehmetkr-31 wants to merge 1 commit into
Conversation
…ations `network` and `wal` reach `impl_versioned_codec!` and `impl_versioned_codec_with_legacy_fallback!` through textual scope — there is no path import and no `pub(crate) use` re-export. Hoisting the `pub mod` block above the macros, or alphabetising the file, breaks all 11 invocation sites with `cannot find macro`, and nothing at those sites hints at the dependency. Comments only; no behaviour change.
|
Verified all of it against
For the record, the sturdier alternative from the #232 review thread is still available if this ever bites: reinstate a |
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.
networkandwalreachimpl_versioned_codec!andimpl_versioned_codec_with_legacy_fallback!through textual scope — there is no path import and nopub(crate) usere-export onmain. Hoisting thepub modblock above the macros, or alphabetisingcodec/mod.rs, breaks all 11 invocation sites withcannot find macro, and nothing at those sites hints at the dependency.Two comment lines, one per macro, so moving either one alone still surfaces the constraint. No behaviour change;
cargo check -p arc-consensus-typesandcargo fmt --all --checkclean.Context: @osr21 raised this while reviewing #232, which proposed removing the imports that made the ordering irrelevant. The v0.8.0 sync (#285) removed them upstream instead, so #232 is superseded — but the fragility it would have introduced now exists on
mainundocumented, and with a second macro depending on it. Closing #232 in favour of this.