-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Previous ID | SR-2117 |
Radar | None |
Original Reporter | @modocache |
Type | Improvement |
Additional Detail from JIRA
Votes | 0 |
Component/s | Source Tooling |
Labels | Improvement, StarterBug |
Assignee | None |
Priority | Medium |
md5: c43f5bd8eac7b069dfaac26bb719e804
Issue Description:
The majority of SourceKit request types, and the format of their responses, is undocumented. Protocol.md documents a small portion of the request types.
We should add documentation for the remaining request types:
-
-
source.request.crash_exit
-
-
source.request.mangle_simple_class PR #4733
-
-
-
-
-
source.request.codecomplete.close
-
source.request.codecomplete.update
-
source.request.codecomplete.cache.ondisk
-
source.request.codecomplete.setpopularapi
-
source.request.codecomplete.setcustom
-
-
source.request.relatedidents
-
source.request.editor.open
-
-
source.request.editor.open.interface.header
-
source.request.editor.open.interface.swiftsource
-
source.request.editor.open.interface.swifttype
-
source.request.editor.extract.comment
-
source.request.editor.close
-
source.request.editor.replacetext
-
source.request.editor.formattext
-
source.request.editor.expand_placeholder
-
source.request.editor.find_usr
-
source.request.editor.find_interface_doc
-
source.request.buildsettings.register
-
source.request.module.groups
To contribute:
-
Build the Swift compiler from source on macOS. You should have a copy of
sourcekitd-test
andsourcekitd-repl
in yourswift-macosx-x86_64/bin
build directory. -
Try invoking
sourcekitd-test -req=foo
, wherefoo
is one of the values in this list: https://github.com/apple/swift/blob/7ac11087de44eb17855e6306d22bb9f345140a1d/tools/SourceKit/tools/sourcekitd-test/TestOptions.cpp#L136-L140. You'll need to read the source code to figure out what parameters the request types need to be passed. -
Look at the response, and document its structure in https://github.com/apple/swift/blob/master/tools/SourceKit/docs/Protocol.md