Skip to content

Collect executables from modules generated by macro calls#10184

Merged
integraledelebesgue merged 1 commit into
mainfrom
fix/declarative-macro-executables
Jul 3, 2026
Merged

Collect executables from modules generated by macro calls#10184
integraledelebesgue merged 1 commit into
mainfrom
fix/declarative-macro-executables

Conversation

@integraledelebesgue

@integraledelebesgue integraledelebesgue commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Unitl now, find_executable_function_ids would skip modules generated by calling declarative macros on a top level (ModuleId::MacroCall). In particular, it disallowed generating Forge tests using declarative macros

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@integraledelebesgue integraledelebesgue marked this pull request as ready for review July 2, 2026 11:57
@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Narrow change to executable discovery with an added test; no auth or data paths, though macro-expanded executables could slightly widen what gets compiled as entry points.

Overview
Executable discovery now walks the same module graph as semantic caching, so #[executable]-style functions emitted inside declarative macro expansions are no longer skipped.

find_executable_function_ids replaces db.crate_modules with all_crate_modules_for_cache, which follows submodule and macro-call module edges (e.g. top-level make_executable!()). That unblocks patterns like Forge tests defined via macros. A compiler integration test asserts an executable inside a macro-generated module is collected under the mock "some" attribute.

Reviewed by Cursor Bugbot for commit c55309e. Bugbot is set up for automated code reviews on this repo. Configure here.

@integraledelebesgue integraledelebesgue requested a review from orizi July 2, 2026 11:58

@orizi orizi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@orizi reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on integraledelebesgue).

@integraledelebesgue integraledelebesgue added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit f46f645 Jul 3, 2026
54 checks passed
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.

3 participants