Skip to content

Commit 9410a14

Browse files
committed
Merge branch 'topic/skip_alr' into 'edge'
Don't call `alr` if environment has been already set See merge request eng/ide/ada_language_server!1157
2 parents 25b4947 + 1c6ba19 commit 9410a14

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

source/ada/lsp-ada_handlers.adb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ with Ada.Strings.UTF_Encoding;
2626
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
2727
with Ada.Unchecked_Deallocation;
2828

29-
with GNAT.OS_Lib; use GNAT.OS_Lib;
29+
with GNAT.OS_Lib;
3030
with GNATCOLL.Utils; use GNATCOLL.Utils;
3131

3232
with GPR2.Containers;
@@ -37,6 +37,8 @@ with GPR2.Project.Source.Set;
3737
with GPR2.Project.Tree.View_Builder;
3838
with GPR2.Project.View;
3939

40+
with Spawn.Environments;
41+
4042
with VSS.Characters.Latin;
4143
with VSS.Strings.Conversions;
4244
with VSS.Unicode;
@@ -5003,7 +5005,9 @@ package body LSP.Ada_Handlers is
50035005
Alire_TOML : constant GNATCOLL.VFS.Virtual_File :=
50045006
Self.Root.Create_From_Dir ("alire.toml");
50055007
begin
5006-
if Alire_TOML.Is_Regular_File then
5008+
if Alire_TOML.Is_Regular_File
5009+
and Spawn.Environments.System_Environment.Value ("ALIRE") /= "True"
5010+
then
50075011

50085012
Self.Trace.Trace ("Check alire:");
50095013

@@ -5107,6 +5111,7 @@ package body LSP.Ada_Handlers is
51075111
(Self : access Message_Handler;
51085112
Operation : String := "") return LSP_Number_Or_String
51095113
is
5114+
use GNAT.OS_Lib;
51105115

51115116
Pid : constant String :=
51125117
GNATCOLL.Utils.Image (Pid_To_Integer (Current_Process_Id), 1);

0 commit comments

Comments
 (0)