Skip to content

Commit 62384a0

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents b5ff2ad + 95ec800 commit 62384a0

15 files changed

+95
-4
lines changed

scripts/generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
'DeleteFilesParams'),
351351

352352
('$/cancelRequest', 'Cancel', 'CancelParams'),
353+
('$/setTrace', 'SetTrace', 'SetTraceParams'),
353354

354355
# TODO: rename these to TextDocumentDidOpen/DidChange/DidSave/DidClose?
355356
('textDocument/didOpen', 'DidOpenTextDocument',

scripts/io_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@
518518
"refactorrewrite": "refactor.rewrite",
519519
"source": "source",
520520
"sourceorganizeimports": "source.organizeImports",
521-
"messages_trace": "message", # for TraceValue
521+
"messages_trace": "messages", # for TraceValue
522522
"diff": "delta", # for SemanticTokens
523523
"an_abstract": "abstract", # for SemanticTokenTypes
524524
"an_interface": "interface",

source/ada/lsp-ada_handlers.ads

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,14 @@ private
677677
-- This is intentionally null procedure, because cancel is implemented by
678678
-- LSP server itself.
679679

680+
overriding procedure On_SetTrace_Notification
681+
(Self : access Message_Handler;
682+
Value : LSP.Messages.SetTraceParams) is null;
683+
-- This is intentionally set to null since VS Code already handle traces
684+
-- by itself correctly, outputting the LSP requests being sent
685+
-- and the returned results with more or less verbosity depending on the
686+
-- settings.
687+
680688
overriding function Get_Open_Document
681689
(Self : access Message_Handler;
682690
URI : LSP.Messages.DocumentUri;

source/ada/lsp-fuzz_decorators.adb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ package body LSP.Fuzz_Decorators is
109109
Self.Handler.On_Cancel_Notification (Value);
110110
end On_Cancel_Notification;
111111

112+
------------------------------
113+
-- On_SetTrace_Notification --
114+
------------------------------
115+
116+
overriding procedure On_SetTrace_Notification
117+
(Self : access Fuzz_Notification_Decorator;
118+
Value : LSP.Messages.SetTraceParams) is
119+
begin
120+
Self.Handler.On_SetTrace_Notification (Value);
121+
end On_SetTrace_Notification;
122+
112123
------------------------------------
113124
-- On_DidCreateFiles_Notification --
114125
------------------------------------

source/ada/lsp-fuzz_decorators.ads

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ package LSP.Fuzz_Decorators is
6868
(Self : access Fuzz_Notification_Decorator;
6969
Value : LSP.Messages.CancelParams);
7070

71+
overriding procedure On_SetTrace_Notification
72+
(Self : access Fuzz_Notification_Decorator;
73+
Value : LSP.Messages.SetTraceParams);
74+
7175
overriding procedure On_DidCreateFiles_Notification
7276
(Self : access Fuzz_Notification_Decorator;
7377
Value : LSP.Messages.CreateFilesParams);

source/client/lsp-clients.adb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,20 @@ package body LSP.Clients is
11611161
Self.Send_Notification ("$/cancelRequest", Message);
11621162
end On_Cancel_Notification;
11631163

1164+
------------------------------
1165+
-- On_SetTrace_Notification --
1166+
------------------------------
1167+
1168+
overriding procedure On_SetTrace_Notification
1169+
(Self : access Client;
1170+
Value : LSP.Messages.SetTraceParams)
1171+
is
1172+
Message : SetTrace_Notification :=
1173+
(params => Value, others => <>);
1174+
begin
1175+
Self.Send_Notification ("$/setTrace", Message);
1176+
end On_SetTrace_Notification;
1177+
11641178
------------------------------------
11651179
-- On_DidCreateFiles_Notification --
11661180
------------------------------------

source/client/lsp-clients.ads

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ package LSP.Clients is
7878
(Self : access Client;
7979
Value : LSP.Messages.CancelParams);
8080

81+
overriding procedure On_SetTrace_Notification
82+
(Self : access Client;
83+
Value : LSP.Messages.SetTraceParams);
84+
8185
overriding procedure On_DidCreateFiles_Notification
8286
(Self : access Client;
8387
Value : LSP.Messages.CreateFilesParams);

source/gpr/lsp-gpr_handlers.ads

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ private
281281
-- This is intentionally null procedure, because cancel is implemented by
282282
-- LSP server itself.
283283

284+
overriding procedure On_SetTrace_Notification
285+
(Self : access Message_Handler;
286+
Value : LSP.Messages.SetTraceParams) is null;
287+
284288
overriding function On_ALS_Check_Syntax_Request
285289
(Self : access Message_Handler;
286290
Request : LSP.Messages.Server_Requests.ALS_Check_Syntax_Request)

source/protocol/generated/lsp-message_io.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4440,7 +4440,7 @@ package body LSP.Message_IO is
44404440
JS.R.Read_Next;
44414441
if Text = "off" then
44424442
V := off;
4443-
elsif Text = "message" then
4443+
elsif Text = "messages" then
44444444
V := messages_trace;
44454445
elsif Text = "verbose" then
44464446
V := verbose;
@@ -4468,7 +4468,7 @@ package body LSP.Message_IO is
44684468
when off =>
44694469
return "off";
44704470
when messages_trace =>
4471-
return "message";
4471+
return "messages";
44724472
when verbose =>
44734473
return "verbose";
44744474
end case;

source/protocol/generated/lsp-messages-server_notifications.adb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ package body LSP.Messages.Server_Notifications is
9797
Handler.On_Cancel_Notification (Self.params);
9898
end Visit;
9999

100+
overriding procedure Visit
101+
(Self : SetTrace_Notification;
102+
Handler : access Server_Notification_Receiver'Class) is
103+
begin
104+
Handler.On_SetTrace_Notification (Self.params);
105+
end Visit;
106+
100107
overriding procedure Visit
101108
(Self : DidOpenTextDocument_Notification;
102109
Handler : access Server_Notification_Receiver'Class) is
@@ -163,6 +170,10 @@ begin
163170
("$/cancelRequest",
164171
Cancel_Notification'Tag);
165172

173+
Map.Insert
174+
("$/setTrace",
175+
SetTrace_Notification'Tag);
176+
166177
Map.Insert
167178
("textDocument/didOpen",
168179
DidOpenTextDocument_Notification'Tag);

0 commit comments

Comments
 (0)