Skip to content

Fix extern_path refs to use deconflicted nested module names#233

Open
th0114nd wants to merge 4 commits into
anthropics:mainfrom
th0114nd:fix/extern-path-deconflicted-module
Open

Fix extern_path refs to use deconflicted nested module names#233
th0114nd wants to merge 4 commits into
anthropics:mainfrom
th0114nd:fix/extern-path-deconflicted-module

Conversation

@th0114nd

Copy link
Copy Markdown
Contributor

Fixes #232

Follow-up to #135: when a top-level message module is renamed for sub-package deconflict (e.g. money_ vs sub-package money), cross-crate extern_path references must use the same deconflicted module name.

Change

  • Build nested_module_names from all packages in the descriptor set (including packages referenced only via extern_path), so deconflict results match the owning crate.
  • Use those names when resolving nested types through extern_path (enums, nested messages).
  • Add test_extern_path_nested_enum_uses_deconflicted_module mirroring the issue repro.

Test plan

  • cargo test -p buffa-codegen test_extern_path_nested_enum_uses_deconflicted_module
  • Existing extern_path unit tests unchanged

Made with Cursor

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

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).
@th0114nd th0114nd force-pushed the fix/extern-path-deconflicted-module branch from ba7277e to 02ba5bb Compare June 22, 2026 18:46
@th0114nd th0114nd force-pushed the fix/extern-path-deconflicted-module branch from 083bcff to ff4e7bd Compare June 23, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extern_path references use undeconflicted nested module names after sub-package deconflict (#135)

1 participant