@@ -25,7 +25,6 @@ with Libadalang.Semantic_Diagnostics;
2525with VSS.Strings.Conversions ;
2626
2727with GNATCOLL.Traces ; use GNATCOLL.Traces;
28- with GNATCOLL.VFS ;
2928
3029with LSP.Ada_Context_Sets ;
3130with LSP.Ada_Documents.Semantic_Diagnostics ;
@@ -164,7 +163,7 @@ package body LSP.Ada_Semantic_Diagnostics is
164163 -- closed while this job was in the queue: discard it.
165164 Me_Debug.Trace
166165 (" Cancelling semantic diagnostics job for "
167- & Self.Handler.To_File (Self.Document.URI) .Display_Base_Name
166+ & Self.File_Name .Display_Base_Name
168167 & " because the project was reloaded, server is shutting down, or document was closed" );
169168 Free (Self.Cursor);
170169 Status := LSP.Server_Jobs.Done;
@@ -181,7 +180,7 @@ package body LSP.Ada_Semantic_Diagnostics is
181180
182181 Me_Debug.Trace
183182 (" Cancelling semantic diagnostics job for "
184- & Self.Handler.To_File (Self.Document.URI) .Display_Base_Name
183+ & Self.File_Name .Display_Base_Name
185184 & " because the document was edited since it was enqueued" );
186185 Free (Self.Cursor);
187186 Status := LSP.Server_Jobs.Done;
@@ -205,7 +204,7 @@ package body LSP.Ada_Semantic_Diagnostics is
205204 if not Self.Ranges.Is_Empty then
206205
207206 Me_Debug.Trace (" Executing a per-range semantic diagnostics job for "
208- & Self.Handler.To_File (Self.Document.URI) .Display_Base_Name
207+ & Self.File_Name .Display_Base_Name
209208 & " (version "
210209 & Self.Document_Version.Value'Image
211210 & " )" );
@@ -273,8 +272,7 @@ package body LSP.Ada_Semantic_Diagnostics is
273272 begin
274273 Me_Debug.Trace
275274 (" Semantic diagnostics traversal completed for "
276- & Self.Handler.To_File (Self.Document.URI)
277- .Display_Base_Name
275+ & Self.File_Name.Display_Base_Name
278276 & " (version "
279277 & Self.Document_Version.Value'Image
280278 & " )" );
@@ -349,6 +347,7 @@ package body LSP.Ada_Semantic_Diagnostics is
349347 begin
350348 Job.Project_Stamp := Handler.Get_Project_Stamp;
351349 Job.Document := Document;
350+ Job.File_Name := Handler.To_File (Document.URI);
352351 Job.Document_Version := Document.Identifier.version;
353352 Job.Ranges := Ranges;
354353 Job_Access := LSP.Server_Jobs.Server_Job_Access (Job);
0 commit comments