Skip to content

Commit

Permalink
Merge branch 'topic/#1573' into 'master'
Browse files Browse the repository at this point in the history
Fix accessibility check failures on Mac OS

Closes #1573

See merge request eng/ide/ada_language_server!1866
  • Loading branch information
AnthonyLeonardoGracio committed Dec 19, 2024
2 parents d57fd2b + 8343f97 commit cd011fa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions source/ada/lsp-ada_driver.adb
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ procedure LSP.Ada_Driver is
Server : aliased LSP.Servers.Server;
Stream : aliased LSP.Stdio_Streams.Stdio_Stream;
Ada_Handler : aliased LSP.Ada_Handlers.Message_Handler
(Server'Access, Server'Access, Tracer'Unchecked_Access);
(Server'Unchecked_Access, Server'Access, Tracer'Unchecked_Access);
GPR_Handler : aliased LSP.GPR_Handlers.Message_Handler
(Server'Access, Tracer'Unchecked_Access);
(Server'Unchecked_Access, Tracer'Unchecked_Access);

-- Job handlers
Ada_Did_Change_Handler : aliased
Expand Down
6 changes: 3 additions & 3 deletions source/ada/lsp-ada_handlers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ with LSP.Formatters.Texts;
with LSP.Generic_Cancel_Check;
with LSP.GNATCOLL_Tracers.Handle;
with LSP.Search;
with LSP.Servers;
with LSP.Servers.FS_Watch;
with LSP.Structures.LSPAny_Vectors;
with LSP.Utils;
Expand Down Expand Up @@ -397,7 +396,7 @@ package body LSP.Ada_Handlers is
----------------

procedure Initialize
(Self : access Message_Handler'Class;
(Self : in out Message_Handler;
Incremental_Text_Changes : Boolean;
CLI_Config_File : GNATCOLL.VFS.Virtual_File :=
GNATCOLL.VFS.No_File)
Expand All @@ -407,7 +406,8 @@ package body LSP.Ada_Handlers is
Self.File_Monitor :=
new LSP.Servers.FS_Watch.FS_Watch_Monitor (Self.Server);
Self.Diagnostic_Sources :=
[new LSP.Ada_Handlers.Project_Diagnostics.Diagnostic_Source (Self)];
[new LSP.Ada_Handlers.Project_Diagnostics.Diagnostic_Source
(Self'Unchecked_Access)];

Self.Load_Config_Files (CLI_Config_File);
end Initialize;
Expand Down
8 changes: 4 additions & 4 deletions source/ada/lsp-ada_handlers.ads
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ with LSP.Server_Notification_Receivers;
with LSP.Server_Notifications;
with LSP.Server_Request_Receivers;
with LSP.Server_Requests;
limited with LSP.Servers;
with LSP.Servers;
with LSP.Structures;
with LSP.Tracers;
with LSP.Unimplemented_Handlers;
Expand All @@ -62,7 +62,7 @@ private with LAL_Refactor;
package LSP.Ada_Handlers is

type Message_Handler
(Server : not null access LSP.Servers.Server'Class;
(Server : not null LSP.Servers.Server_Access;
-- Please avoid to use this discriminant!
Sender : not null access LSP.Client_Message_Receivers
.Client_Message_Receiver'Class;
Expand All @@ -74,7 +74,7 @@ package LSP.Ada_Handlers is
with private;

procedure Initialize
(Self : access Message_Handler'Class;
(Self : in out Message_Handler;
Incremental_Text_Changes : Boolean;
CLI_Config_File : GNATCOLL.VFS.Virtual_File :=
GNATCOLL.VFS.No_File);
Expand Down Expand Up @@ -168,7 +168,7 @@ private
type Has_Been_Canceled_Function is access function return Boolean;

type Message_Handler
(Server : not null access LSP.Servers.Server'Class;
(Server : not null LSP.Servers.Server_Access;
-- Please avoid to use this discriminant!
Sender : not null access LSP.Client_Message_Receivers
.Client_Message_Receiver'Class;
Expand Down
4 changes: 2 additions & 2 deletions source/server/lsp-servers-fs_watch.ads
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private with Libfswatch;

package LSP.Servers.FS_Watch is

type FS_Watch_Monitor (Server : access LSP.Servers.Server'Class) is
type FS_Watch_Monitor (Server : not null LSP.Servers.Server_Access) is
limited new LSP.File_Monitors.File_Monitor with private;

private
Expand Down Expand Up @@ -66,7 +66,7 @@ private
end Monitor_Task;
type Monitor_Task_Access is access Monitor_Task;

type FS_Watch_Monitor (Server : access LSP.Servers.Server'Class) is
type FS_Watch_Monitor (Server : not null LSP.Servers.Server_Access) is
limited new LSP.File_Monitors.File_Monitor with
record
Filesystem_Monitor_Task : Monitor_Task_Access;
Expand Down
4 changes: 2 additions & 2 deletions source/server/lsp-servers.ads
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ private with VSS.Stream_Element_Vectors;
package LSP.Servers is

type Server is limited
new LSP.Client_Message_Receivers.Client_Message_Receiver
with private;
new LSP.Client_Message_Receivers.Client_Message_Receiver with private;
type Server_Access is access all Server'Class with Storage_Size => 0;
-- The representation of LSP server.
-- Use methods of Client_Message_Receiver to send notifications, requests
-- and responses to the LSP client.
Expand Down

0 comments on commit cd011fa

Please sign in to comment.