File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,43 @@ Welcome to SourceKit. Type ':help' for assistance.
455
455
}
456
456
```
457
457
458
+ ## Protocol Version
459
+
460
+ SourceKit can provide information about the version of the protocol that is being used.
461
+
462
+ ### Request
463
+
464
+ ```
465
+ {
466
+ <key.request>: (UID) <source.request.protocol_version>
467
+ }
468
+ ```
469
+
470
+ ### Response
471
+
472
+ ```
473
+ {
474
+ <key.version_major>: (int64) // The major version number in a version string
475
+ <key.version_minor>: (int64) // The minor version number in a version string
476
+ }
477
+ ```
478
+
479
+ ### Testing
480
+
481
+ ```
482
+ $ sourcekitd-test -req=version
483
+ ```
484
+
485
+ or
486
+
487
+ ```
488
+ $ sourcekitd-repl
489
+ Welcome to SourceKit. Type ':help' for assistance.
490
+ (SourceKit) {
491
+ key.request: source.request.protocol_version
492
+ }
493
+ ```
494
+
458
495
# UIDs
459
496
460
497
## Keys
@@ -472,3 +509,5 @@ Welcome to SourceKit. Type ':help' for assistance.
472
509
- ` key.sourcetext `
473
510
- ` key.typename `
474
511
- ` key.usr `
512
+ - ` key.version_major `
513
+ - ` key.version_minor `
You can’t perform that action at this time.
0 commit comments