E0603 on a registry dependency that re-exports a proc macro under a private module's name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start at libs/relax/front/src/program/privacy.rs:68, where the visibility check already has the macro case, and follow it into lookup_macro_in_container (libs/relax/front/src/program.rs:5322), which reads only mods[d.sub].macros; that map is filled for exported macro_rules! at libs/relax/front/src/program.rs:3444 but apparently not for pub use-re-exported proc macros. Build the repro crate from the issue and run relax check on it, then compare with the path-dependency control, which works, to find where the registry seeding path drops the re-export. Done means the repro checks cleanly and existing macro-resolution tests still pass.
Written by the indexing model from the issue text.
Description
On Relax 953d174a (macOS arm64), relax check rejects a use of a re-exported proc macro when the exporting crate also has a private module of that name. rustc accepts it.
Reproduce
Cargo.toml
[package]
name = "repro-e0603"
version = "0.1.0"
edition = "2024"
[workspace]
[dependencies]
rutis = "0.23.0"
src/main.rs
use rutis::service;
fn main() {}
cargo generate-lockfile # relax requires a lockfile
relax check repro-e0603
Expected: no error (rustc 1.100 reports only unused_imports).
Actual:
src/main.rs:1:1: E0603: module `service` is private
rutis 0.23.0 has both a private module and a public re-export of the attribute macro under the same name:
src/lib.rs:60:mod service;src/lib.rs:81:pub use rutis_macros::service;
Where it points
libs/relax/front/src/program/privacy.rs:68 already has a case for exactly this:
let mut visible = last && in_use && last_ns.is_none() && self.lookup_macro_in_container(cur, name);
lookup_macro_in_container (libs/relax/front/src/program.rs:5322) only checks mods[d.sub].macros. That map is filled for exported macro_rules! at libs/relax/front/src/program.rs:3444, but a pub use-re-exported proc macro is not registered there, so the private mod service wins.
Control
The same shape as a path dependency does not reproduce: a local crate with mod service; + pub use local_macro::service;, imported as use local_crate::service;, checks cleanly. So the missing binding looks specific to registry crates (the seeding/demand path), not to use resolution in general.
- Dominant language
- Rust
- Stars
- 601
- Forks
- 34
- Avg merge
- 1h 58m
- Merged PRs (30d)
- 45
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from makepad/relax
-
std: `SliceIndex<str>` missing for `std::ops` ranges, so generic `R: SliceIndex<str>` bounds failOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
Maintainers usually reply within 1 day
-
Relax live tests rerun the whole suite after a one-line body editMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 32/100
Maintainers usually reply within 1 day
Similar issues
-
CI/CD ignore-for-release
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eclipse-ankaios/ankaios#844 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
symposium-dev/symposium#530 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
topgrade-rs/topgrade#2540 ·
Maintainers usually reply within 1 day