Don't dump callHierarchy/incomingCalls response

to trace file to avoid stack overflow on a long response.

Fixes #1468
This commit is contained in:
Maxim Reznik
2024-10-29 17:05:17 +02:00
committed by Max Reznik
parent b285740585
commit 76c8ebb700
2 changed files with 27 additions and 0 deletions

View File

@@ -175,6 +175,28 @@ package body LSP.Secure_Message_Loggers is
Self.Output.New_Line (Ok);
end On_FoldingRange_Response;
-------------------------------
-- On_IncomingCalls_Response --
-------------------------------
overriding procedure On_IncomingCalls_Response
(Self : in out Client_Response_Logger;
Id : LSP.Structures.Integer_Or_Virtual_String;
Value : LSP.Structures.CallHierarchyIncomingCall_Vector_Or_Null)
is
Ok : Boolean := True;
begin
-- Hide response, because it could be lengthly and expose names
Self.Output.Put ("'callHierarchy/incomingCalls'", Ok);
Self.Put_Id (Id, Ok);
Self.Output.Put (" result : len=", Ok);
Self.Output.Put
(VSS.Strings.To_Virtual_String (Value.Length'Wide_Wide_Image), Ok);
Self.Output.New_Line (Ok);
end On_IncomingCalls_Response;
----------------------------
-- On_References_Response --
----------------------------

View File

@@ -80,6 +80,11 @@ package LSP.Secure_Message_Loggers is
Id : LSP.Structures.Integer_Or_Virtual_String;
Value : LSP.Structures.Symbol_Result);
overriding procedure On_IncomingCalls_Response
(Self : in out Client_Response_Logger;
Id : LSP.Structures.Integer_Or_Virtual_String;
Value : LSP.Structures.CallHierarchyIncomingCall_Vector_Or_Null);
type Server_Notification_Logger is
new LSP.Server_Notification_Loggers.Server_Notification_Logger
with null record;