Index data incomplete when referencing an ambiguous type name #64598
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
declarations
Feature: declarations
expressions
Feature: expressions
indexing
Area → source tooling: AST indexing
multiple modules
Flag: An issue whose reproduction requires multiple modules
source tooling
Area: IDE support, SourceKit, and other source tooling
swift 5.9
type declarations
Feature → declarations: Type declarations
unexpected behavior
Bug: Unexpected behavior or incorrect output
Description
With this code:
The index data for Module3 includes no references at all to
Thing
or the initializer being called. This is easiest to visualize with indexutil-annotate:If I add the explicit module name to the call like this:
_ = Module0.Thing(string: "lol")
we get what appears to be the right data:Also removing the import to
Module1
also gives us the right info:Steps to reproduce
Using this project initextension.zip and
indexutil-annotate
:swift build
indexutil-annotate .build/debug/index/store/ Sources/Module2/Module2.swift
You can also inspect the record naively with
strings
to see there are no other string references toModule2
:Expected behavior
The specific type should be known because the initializer disambiguates it, and that should be present in the index data.
Environment
I also tested with Swift @ 1b13b59
The text was updated successfully, but these errors were encountered: