Skip to content

Instantly share code, notes, and snippets.

c-index-test core --print-record ./ViewController.swift-2M7QNU6QQ2YVC
...
class/Swift | UIViewController | c:objc(cs)UIViewController | <no-cgname> | Ref,RelBase - RelRec
constructor/Swift | init(nibName:bundle:) | c:@M@IndexingDemo@objc(cs)ViewController(im)initWithNibName:bundle: | <no-cgname> | Def,Impl,RelChild,RelOver -
constructor/Swift | init(nibName:bundle:) | c:objc(cs)UIViewController(im)initWithNibName:bundle: | <no-cgname> | - RelOver
constructor/Swift | init(coder:) | c:@M@IndexingDemo@objc(cs)ViewController(im)initWithCoder: | <no-cgname> | Def,Impl,RelChild,RelOver -
constructor/Swift | init(coder:) | c:objc(cs)UIViewController(im)initWithCoder: | <no-cgname> | - RelOver
instance-method/Swift | viewDidLoad() | c:@M@IndexingDemo@objc(cs)ViewController(im)viewDidLoad | <no-cgname> | Def,Dyn,RelChild,RelOver - RelCall,RelCont
c-index-test core --print-unit ./ViewController.o-ZXIBQDWBMGRS
provider: swift-
is-system: 0
is-module: 0
module-name: IndexingDemo
has-main: 1
main-path: /Users/vedon/Documents/Private/IndexingDemo/IndexingDemo/ViewController.swift
work-dir: /Users/vedon/Documents/Private/IndexingDemo
out-file: /Users/vedon/Library/Developer/Xcode/DerivedData/IndexingDemo-guvkozihwbaavpbgglnzsmnmipgx/Build/Intermediates.noindex/IndexingDemo.build/Debug-iphonesimulator/IndexingDemo.build/Objects-normal/x86_64/ViewController.o
SourceKit-client: service queried UID for: key.indexer.arg.workspace-name
SourceKit-client: service queried UID for: key.indexer.arg.workspace-file
SourceKit-client: service queried UID for: key.indexer.arg.index-folder
SourceKit-client: service queried UID for: key.indexer.arg.datastore-folder
SourceKit-client: service queried UID for: key.indexer.arg.database-folder
SourceKit-client: service queried UID for: key.indexer.arg.pch-header-folder
SourceKit-client: service queried UID for: key.indexer.arg.build-config
SourceKit-client: service queried UID for: key.indexer.arg.destination-target-id
SourceKit-client: service queried UID for: key.indexer.arg.destination-sdk-variant
SourceKit-client: service queried UID for: key.indexer.arg.index-database-path
2020-08-11 16:16:00.716 Xcode[33874:47448018] SourceKit-client: [2:request:205587:1355.4146] [839] {
key.request: source.request.workspace.refactoring.find-rename-ranges-at-location,
key.indexer.arg.indexer-token: 1,
key.indexer.arg.query.file-content: "<DATA>",
key.indexer.arg.occurrence.location: {
key.indexer.arg.doc-loc.url: "file:///Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo/ViewController.swift",
key.indexer.arg.doc-loc.start-line: 19,
key.indexer.arg.doc-loc.start-col: 14,
key.indexer.arg.doc-loc.end-line: 19,
key.indexer.arg.doc-loc.end-col: 14,
2020-08-11 16:09:10.248 Xcode[33874:47431447] SourceKit-client: [2:response:775:944.9466] [227] {
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
key.syntaxmap: [
],
key.substructure: [
{
key.kind: source.lang.swift.decl.class,
key.name: "Modal",
key.offset: 147,
key.length: 55,
2020-08-11 15:58:33.804 Xcode[33874:47408816] SourceKit-client: [2:request:156931:308.5030] [336] {
key.request: source.request.indexer.srv.jump-to-expression-definition,
key.indexer.arg.indexer-token: 1,
key.indexer.arg.query.name: "hello",
key.indexer.arg.query.doc-location: {
key.indexer.arg.doc-loc.url: "file:///Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo/ViewController.swift",
key.indexer.arg.doc-loc.start-line: 17,
key.indexer.arg.doc-loc.start-col: 9,
key.indexer.arg.doc-loc.end-line: 17,
key.indexer.arg.doc-loc.end-col: 9,
2020-08-11 16:04:56.202 Xcode[33874:47419755] SourceKit-client: [2:request:775:690.9009] [398] {
key.request: source.request.indexer.notify-indexable-did-add-file,
key.filepath: "/Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo/Modal.swift",
key.indexer.arg.indexer-token: 1,
key.indexer.arg.indexable.id: "/Users/vedon/Documents/Private/ModularDesign/IndexingDemo/IndexingDemo.xcodeproj/IndexingDemo-4ED35A0324E2816600806386"
}

Enable indexing

  • defaults delete com.apple.dt.Xcode IDEIndexEnable
  • defaults write com.apple.dt.Xcode IDEIndexEnable -bool YES

Disable indexing

  • defaults delete com.apple.dt.Xcode IDEIndexDisable
  • defaults write com.apple.dt.Xcode IDEIndexDisable -bool YES

Show Indexing numeric progress

  • defaults write com.apple.dt.Xcode IDEIndexerActivityShowNumericProgress -bool YES
### Swift dependencies file v0 ###
provides-top-level:
- "Feature2"
provides-nominal:
- "8Feature2AAC"
provides-member:
- ["8Feature2AAC", ""]
provides-dynamic-lookup:
- "doSomething"
- "feature1"
/usr/bin/swift
-frontend -c /Feature3.swift
-primary-file PrivateModel.swift
-emit-module-path /PrivateModel\~partial.swiftmodule
-emit-module-doc-path /PrivateModel\~partial.swiftdoc