Skip to content

fix(rust): normalize raw crate identifiers - #586

Merged
rowkav09 merged 1 commit into
mainfrom
fix/rust-raw-identifier-crates
Oct 1, 2026
Merged

rowkav09 merged 1 commit into
mainfrom
fix/rust-raw-identifier-crates

Conversation

@rowkav09

@rowkav09 rowkav09 commented Oct 1, 2026

Copy link
Copy Markdown
Member

Closes #583.

Strip the r# raw identifier syntax before matching Rust crate roots against manifest dependencies. Same normalization applies to excluded builtin roots. Previously use r#try::Thing and r#try::run() returned no usage for dependency try.

Fail-first regression reproduces missing lines1/2. After patch all79 Rust tests+lint green.

@rowkav09

rowkav09 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

APPROVE at 91a2b1a

collectReferences now strips a leading r# from the crate path root before the exclusion check and before recording the reference, so r#try::run() and use r#try::Thing both match a dependency named try. The test checks both lines (1 and 2). Rust adapter suite on the head merged with main: 79/79.

Minor, not blocking: the imported symbol name is not stripped, so use foo::r#type would record the symbol as "r#type". It only affects the symbol label, not whether the usage is found.

CI: not checked by me; the lane merges on APPROVE plus green CI.

Reviewed as rowkav09, the same account as the author, so this is not an independent GitHub approval.

@rowkav09
rowkav09 force-pushed the fix/rust-raw-identifier-crates branch from 91a2b1a to df323c2 Compare October 1, 2026 21:15
@rowkav09

rowkav09 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Re-ack at df323c2: APPROVE.

Rebase only. The source change is the same as the head I approved earlier (91a2b1a): the r# strip in collectReferences, 2 files changed. The test conflict is resolved and the Rust adapter suite on the head merged with main passes, 80/80. Reviewed as rowkav09, the same account as the author, so this is not an independent GitHub approval.

@rowkav09
rowkav09 merged commit e8295a5 into main Oct 1, 2026
14 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.

Rust raw crate identifiers are not matched to dependency names

1 participant