Remove false positive missing messages for other module SourceRanges (#7050)

This commit is contained in:
Jonathan Tran
2025-05-18 06:21:10 -04:00
committed by GitHub
parent 3c94fe9047
commit 3168c22de7
17 changed files with 13 additions and 1142 deletions

View File

@ -308,6 +308,11 @@ impl ArtifactGraph {
// a child of the line above it.
let label = label.unwrap_or("");
if code_ref.node_path.is_empty() {
if !code_ref.range.module_id().is_top_level() {
// This is pointing to another module. We don't care about
// these. It's okay that it's missing, for now.
return Ok(());
}
return writeln!(output, "{prefix} %% {label}Missing NodePath");
}
writeln!(output, "{prefix} %% {label}{:?}", code_ref.node_path.steps)