Fix extern_path refs to use deconflicted nested module names#233
Open
th0114nd wants to merge 4 commits into
Open
Fix extern_path refs to use deconflicted nested module names#233th0114nd wants to merge 4 commits into
th0114nd wants to merge 4 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
When a message module is renamed for sub-package deconflict (e.g. money_), cross-crate extern_path references must use the same module name, not plain snake_case (money::Currency vs money_::Currency).
ba7277e to
02ba5bb
Compare
083bcff to
ff4e7bd
Compare
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.
Fixes #232
Follow-up to #135: when a top-level message module is renamed for sub-package deconflict (e.g.
money_vs sub-packagemoney), cross-crateextern_pathreferences must use the same deconflicted module name.Change
nested_module_namesfrom all packages in the descriptor set (including packages referenced only viaextern_path), so deconflict results match the owning crate.extern_path(enums, nested messages).test_extern_path_nested_enum_uses_deconflicted_modulemirroring the issue repro.Test plan
cargo test -p buffa-codegen test_extern_path_nested_enum_uses_deconflicted_moduleextern_pathunit tests unchangedMade with Cursor