Skip to content

gazelle::provides macro/directive - #39

Merged
Calsign merged 1 commit into
mainfrom
calsignlabs/revup/main/provides-directive
May 4, 2026
Merged

gazelle::provides macro/directive#39
Calsign merged 1 commit into
mainfrom
calsignlabs/revup/main/provides-directive

Conversation

@Calsign

@Calsign Calsign commented May 4, 2026

Copy link
Copy Markdown
Owner

Glob imports (e.g. use some_crate::prelude::*) can introduce arbitrary modules, and
gazelle has no way of tracking this. Similarly, macros can generate modules.

There are various ways one could imagine making this work. You can currently
#[gazelle::ignore] every usage of such a module. This can be cumbersome if the
modules are used in many places.

This PR introduces a lightweight option, #[gazelle::provides(mod1, mod2, ...)],
that allows the user to tell gazelle that a use or macro brings modules into scope.

I'm open to additional options in the future.

Topic: provides-directive

Glob imports (e.g. `use some_crate::prelude::*`) can introduce arbitrary modules, and
gazelle has no way of tracking this. Similarly, macros can generate modules.

There are various ways one could imagine making this work. You can currently
`#[gazelle::ignore]` every usage of such a module. This can be cumbersome if the
modules are used in many places.

This PR introduces a lightweight option, `#[gazelle::provides(mod1, mod2, ...)]`,
that allows the user to tell gazelle that a use or macro brings modules into scope.

I'm open to additional options in the future.

Topic: provides-directive
@Calsign

Calsign commented May 4, 2026

Copy link
Copy Markdown
Owner Author

Reviews in this chain:
#39 gazelle::provides macro/directive

@Calsign

Calsign commented May 4, 2026

Copy link
Copy Markdown
Owner Author
# head base diff date summary
0 f60f3644 62dace6f diff May 4 11:53 AM 4 files changed, 116 insertions(+), 19 deletions(-)

@Calsign Calsign mentioned this pull request May 4, 2026
12 tasks
@Calsign
Calsign merged commit febc8f8 into main May 4, 2026
1 check passed
@Calsign
Calsign deleted the calsignlabs/revup/main/provides-directive branch May 5, 2026 04:50
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.

1 participant