Skip to content

Commit 5fb97ca

Browse files
ogorodnikreznikmm
authored andcommitted
Enable Alire
1 parent 36f006b commit 5fb97ca

File tree

5 files changed

+6
-28
lines changed

5 files changed

+6
-28
lines changed

gnat/ignore_in_317.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
lsp-ada_handlers-alire.adb
2-
lsp-ada_handlers-alire.ads
31
lsp-common.adb
42
lsp-common.ads
53
lsp-error_decorators.adb

source/ada/lsp-ada_handlers-alire.adb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ with GNAT.OS_Lib;
2121
with VSS.Stream_Element_Vectors;
2222
with VSS.Strings.Conversions;
2323
with VSS.Strings.Converters.Decoders;
24+
with VSS.String_Vectors;
2425
with VSS.Characters.Latin;
2526
with VSS.Regular_Expressions;
2627

source/ada/lsp-ada_handlers-project_loading.adb

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ with Spawn.Environments;
3737

3838
with LSP.Ada_Contexts;
3939
with LSP.Ada_Context_Sets;
40+
with LSP.Ada_Handlers.Alire;
4041
with LSP.Ada_Handlers.File_Readers;
4142
with LSP.Ada_Indexing;
4243
with LSP.Enumerations;
@@ -51,26 +52,6 @@ package body LSP.Ada_Handlers.Project_Loading is
5152
GNATCOLL.Traces.On);
5253
-- Trace to enable/disable runtime indexing. Useful for the testsuite.
5354

54-
package Alire is
55-
56-
procedure Run_Alire
57-
(Root : String;
58-
Has_Alire : out Boolean;
59-
Error : out VSS.Strings.Virtual_String;
60-
Project : out VSS.Strings.Virtual_String;
61-
Environment : in out GPR2.Environment.Object) is null;
62-
-- if Root directory contains `alire.toml` file, then run
63-
-- `alr printenv` and fetch the first project from `alire.toml`.
64-
65-
procedure Run_Alire
66-
(Root : String;
67-
Has_Alire : out Boolean;
68-
Error : out VSS.Strings.Virtual_String;
69-
Environment : in out GPR2.Environment.Object) is null;
70-
-- The same as above, but without fetching the project file
71-
72-
end Alire;
73-
7455
procedure Load_Project_With_Alire
7556
(Self : in out Message_Handler'Class;
7657
Project_File : VSS.Strings.Virtual_String := "";
@@ -552,7 +533,7 @@ package body LSP.Ada_Handlers.Project_Loading is
552533

553534
if Project.Is_Empty then
554535

555-
Alire.Run_Alire
536+
LSP.Ada_Handlers.Alire.Run_Alire
556537
(Root => Root (Self).Display_Full_Name,
557538
Has_Alire => Has_Alire,
558539
Error => Errors,
@@ -562,7 +543,7 @@ package body LSP.Ada_Handlers.Project_Loading is
562543
Status := Alire_Project;
563544
else
564545

565-
Alire.Run_Alire
546+
LSP.Ada_Handlers.Alire.Run_Alire
566547
(Root => Root (Self).Display_Full_Name,
567548
Has_Alire => Has_Alire,
568549
Error => Errors,

testsuite/ada_lsp/project_config.alire/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
},
7878
"wait":[{
7979
"id": "defname-1",
80-
"result":[{
80+
"result":{
8181
"uri": "$URI{alire/cache/dependencies/libhello_1.0.1_3c15bc7f/src/libhello.ads}",
8282
"range": {
8383
"start": {
@@ -89,7 +89,7 @@
8989
"character": 24
9090
}
9191
}
92-
}]
92+
}
9393
}]
9494
}
9595
}, {
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
title: 'project_config.alire'
22
skip:
33
- ['SKIP', 'env.build.os.name == "windows"']
4-
# Skip till 3.17 ready
5-
- ['XFAIL', 'True']

0 commit comments

Comments
 (0)