I'm trying to use IndexStoreDB to simply read some symbols from the index, however I've been unable to obtain any results at all.
let storePath = "/Users/ian/code/ileitch/inferno/.build/x86_64-apple-macosx/debug/index/store" let dbPath = NSTemporaryDirectory() + "db" let lib = try IndexStoreLibrary(dylibPath: "/Applications/Xcode11.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libIndexStore.dylib") let db = try IndexStoreDB( storePath: storePath, databasePath: dbPath, library: lib, listenToUnitEvents: false)
When I call e.g
db.canonicalOccurrences(ofName: "SomeClass") it always returns an empty array.
I extended IndexStoreDB to get access to
indexstoredb_index_symbol_names in an attempt to just list all available symbol names, yet that also returns nothing.
Some things I've tried:
- Using an index store generated by
swift buildand also one generated by Xcode (i.e
- Different versions of Xcode - 11.1 and 11.3
I'm sure I must be misunderstanding something pretty fundamental here. Any tips for debugging this?