Fix cross-package signature mismatches. (#7232)

Fixes link failures when referencing a symbol involving a fingerprint
from a different package.

Previously we included the `Namespace`'s `import_id` as part of its
fingerprint, which caused local and imported namespaces to get different
fingerprints. We now store the `import_id` on the `NameScope` instead of
on the `Namespace` inst to avoid this problem.

Also, when we reach a package-level `NameScopeId`, consistently
fingerprint it as a (package name, library name) pair. Previously the
fingerprinting depended on whether it was imported or not, as an
imported `NameScopeId` had a parent scope (the current package). We need
to include the library name here so that private entities with the same
name in different libraries have different fingerprints.
This commit is contained in:
Richard Smith
2026-05-21 00:02:29 +00:00
committed by GitHub
parent 1231098c14
commit 05cc09daca
662 changed files with 51181 additions and 50920 deletions
File diff suppressed because it is too large Load Diff