-
Notifications
You must be signed in to change notification settings - Fork 98
Use IndexStoreDB for Symbol Resolution #31
Comments
Having dug into this a bit over the past few days, here's what I've learned:
Going forward, I think the best approach will be to take a progressive approach to doc generation. As a foundation, we start with a syntactic read of Swift code. If available, we then layer on information from IndexStoreDB (we might conditionalize certain features like symbol linking on the availability of this information). Finally, we might then pull in information from imported modules, like official docs for the Swift Standard Library or Foundation. |
I wonder if more detailed type information would help in any way. Some time ago I've attempted to implement a type inference engine for this type of dev tools (documentation generators, refactoring tools) etc, I wonder if it could be of some use. Especially as symbol resolution in Swift is exacerbated by the presence of overloads, shadowed symbols etc |
Alternatively, we can load generated symbol graphs (JSON files generated by running |
Currently, swift-doc builds a symbol graph syntactically. However, this approach has limitations (#25, #16). We may want to keep the current, syntactic approach around as an option for quick-and-dirty doc generation, but in the long-term, we'll likely want to leverage IndexStoreDB for this.
The text was updated successfully, but these errors were encountered: