-
Notifications
You must be signed in to change notification settings - Fork 325
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Swift version
Swift 6.2
Platform
No response
Editor
No response
Description
#1887 changed OpenInterface.swift as follows:
let urlData = GeneratedInterfaceDocumentURLData(
moduleName: moduleName,
groupName: groupName,
sourcekitdDocumentName: "\(moduleName)-\(UUID())",
primaryFile: document
)
Since GeneratedInterfaceDocumentURLData implements Hashable and hence Equatable, each request is unique. As a result, we never get any cache hits in GeneratedInterfaceManager.swift:
guard let cachedIndex = openInterfaces.firstIndex(where: { $0.url == document }) else {
return nil
}
This makes .swiftinterface requests noticeably slower in my usage.
This was subsequently fixed in #2233, but that's only in Swift 6.3. Could we backport that PR to 6.2? The commits apply cleanly to 6.2 too.
Steps to Reproduce
Open any Swift file with import Foundation and attempt a go-to-def (F12) on Foundation repeatedly. Observe that the
Logging
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working