E0603 on a registry dependency that re-exports a proc macro under a private module's name
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 601
- フォーク
- 34
- 平均マージ
- 1時間 58分
- マージ済み PR(30日)
- 45
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
makepad/relax のほかの issue
-
std: `SliceIndex<str>` missing for `std::ops` ranges, so generic `R: SliceIndex<str>` bounds failオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
Relax live tests rerun the whole suite after a one-line body edit再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
CI/CD ignore-for-release
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
eclipse-ankaios/ankaios#844 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
symposium-dev/symposium#530 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
topgrade-rs/topgrade#2540 ·
メンテナーはふだん 1 日以内に返信