Skip to content

Commit 855830f

Browse files
DanTupcommit-bot@chromium.org
authored andcommitted
Update LSP spec
The spec has un-deprecated insertText which we'll use soon. Change-Id: I2aa6dc8b3392867ecec0d0764b8635453a896a1a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108412 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Danny Tuppeny <[email protected]>
1 parent d992f55 commit 855830f

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,8 +2221,6 @@ class CompletionItem implements ToJsonable {
22212221
/// completion item with an `insertText` of `console` is provided it will only
22222222
/// insert `sole`. Therefore it is recommended to use `textEdit` instead since
22232223
/// it avoids additional client side interpretation.
2224-
/// @deprecated Use textEdit instead.
2225-
@core.deprecated
22262224
final String insertText;
22272225

22282226
/// The format of the insert text. The format applies to both the `insertText`
@@ -6357,18 +6355,18 @@ class FailureHandlingKind {
63576355
/// executed.
63586356
static const Abort = const FailureHandlingKind._('abort');
63596357

6360-
/// All operations are executed transactional. That means they either all
6358+
/// All operations are executed transactionally. That means they either all
63616359
/// succeed or no changes at all are applied to the workspace.
63626360
static const Transactional = const FailureHandlingKind._('transactional');
63636361

63646362
/// If the workspace edit contains only textual file changes they are executed
6365-
/// transactional. If resource changes (create, rename or delete file) are
6363+
/// transactionally. If resource changes (create, rename or delete file) are
63666364
/// part of the change the failure handling strategy is abort.
63676365
static const TextOnlyTransactional =
63686366
const FailureHandlingKind._('textOnlyTransactional');
63696367

63706368
/// The client tries to undo the operations already executed. But there is no
6371-
/// guarantee that this is succeeding.
6369+
/// guarantee that this succeeds.
63726370
static const Undo = const FailureHandlingKind._('undo');
63736371

63746372
Object toJson() => _value;

pkg/analysis_server/tool/lsp_spec/lsp_specification.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ interface LocationLink {
331331
/**
332332
* The target resource identifier of this link.
333333
*/
334-
targetUri: string;
334+
targetUri: DocumentUri;
335335

336336
/**
337337
* The full target range of this link. If the target for example is a symbol then target range is the
@@ -529,7 +529,7 @@ export interface CreateFile {
529529
/**
530530
* The resource to create.
531531
*/
532-
uri: string;
532+
uri: DocumentUri;
533533
/**
534534
* Additional options
535535
*/
@@ -561,11 +561,11 @@ export interface RenameFile {
561561
/**
562562
* The old (existing) location.
563563
*/
564-
oldUri: string;
564+
oldUri: DocumentUri;
565565
/**
566566
* The new location.
567567
*/
568-
newUri: string;
568+
newUri: DocumentUri;
569569
/**
570570
* Rename options.
571571
*/
@@ -597,7 +597,7 @@ export interface DeleteFile {
597597
/**
598598
* The file to delete.
599599
*/
600-
uri: string;
600+
uri: DocumentUri;
601601
/**
602602
* Delete options.
603603
*/
@@ -614,7 +614,7 @@ export interface WorkspaceEdit {
614614
/**
615615
* Holds changes to existing resources.
616616
*/
617-
changes?: { [uri: string]: TextEdit[]; };
617+
changes?: { [uri: DocumentUri]: TextEdit[]; };
618618

619619
/**
620620
* Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
@@ -1001,22 +1001,22 @@ export namespace FailureHandlingKind {
10011001
export const Abort: FailureHandlingKind = 'abort';
10021002

10031003
/**
1004-
* All operations are executed transactional. That means they either all
1004+
* All operations are executed transactionally. That means they either all
10051005
* succeed or no changes at all are applied to the workspace.
10061006
*/
10071007
export const Transactional: FailureHandlingKind = 'transactional';
10081008

10091009

10101010
/**
1011-
* If the workspace edit contains only textual file changes they are executed transactional.
1011+
* If the workspace edit contains only textual file changes they are executed transactionally.
10121012
* If resource changes (create, rename or delete file) are part of the change the failure
10131013
* handling strategy is abort.
10141014
*/
10151015
export const TextOnlyTransactional: FailureHandlingKind = 'textOnlyTransactional';
10161016

10171017
/**
10181018
* The client tries to undo the operations already executed. But there is no
1019-
* guarantee that this is succeeding.
1019+
* guarantee that this succeeds.
10201020
*/
10211021
export const Undo: FailureHandlingKind = 'undo';
10221022
}
@@ -1952,7 +1952,7 @@ interface InitializedParams {
19521952

19531953
#### <a href="#shutdown" name="shutdown" class="anchor">Shutdown Request (:leftwards_arrow_with_hook:)</a>
19541954

1955-
The shutdown request is sent from the client to the server. It asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client). There is a separate exit notification that asks the server to exit. Clients must not sent any notifications other than `exit` or requests to a server to which they have sent a shutdown requests. If a server receives requests after a shutdown request those requests should be errored with `InvalidRequest`.
1955+
The shutdown request is sent from the client to the server. It asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client). There is a separate exit notification that asks the server to exit. Clients must not send any notifications other than `exit` or requests to a server to which they have sent a shutdown requests. If a server receives requests after a shutdown request those requests should be errored with `InvalidRequest`.
19561956

19571957
_Request_:
19581958
* method: 'shutdown'
@@ -2239,7 +2239,7 @@ export interface WorkspaceFolder {
22392239
/**
22402240
* The associated URI for this workspace folder.
22412241
*/
2242-
uri: string;
2242+
uri: DocumentUri;
22432243

22442244
/**
22452245
* The name of the workspace folder. Used to refer to this
@@ -2330,7 +2330,7 @@ export interface ConfigurationItem {
23302330
/**
23312331
* The scope to get the configuration section for.
23322332
*/
2333-
scopeUri?: string;
2333+
scopeUri?: DocumentUri;
23342334

23352335
/**
23362336
* The configuration section asked for.
@@ -2971,8 +2971,6 @@ interface CompletionItem {
29712971
* and a completion item with an `insertText` of `console` is provided it
29722972
* will only insert `sole`. Therefore it is recommended to use `textEdit` instead
29732973
* since it avoids additional client side interpretation.
2974-
*
2975-
* @deprecated Use textEdit instead.
29762974
*/
29772975
insertText?: string;
29782976

0 commit comments

Comments
 (0)