1818with GNATCOLL.VFS ;
1919with GPR2.Log ;
2020with LSP.Structures ;
21+ with VSS.String_Vectors ;
2122
2223package LSP.Ada_Project_Loading is
2324
@@ -69,55 +70,57 @@ package LSP.Ada_Project_Loading is
6970 -- @value Project_Not_Found: the configured project was not found.
7071
7172 procedure Set_Load_Status
72- (Project : in out Project_Status_Type;
73- Status : Project_Status);
73+ (Project : in out Project_Status_Type; Status : Project_Status);
7474 -- Set the status of the project
7575
7676 function Get_Load_Status
7777 (Project : Project_Status_Type) return Project_Status;
7878 -- Return the status
7979
8080 procedure Set_Project_Type
81- (Project : in out Project_Status_Type;
82- Project_Type : Project_Types);
81+ (Project : in out Project_Status_Type; Project_Type : Project_Types);
8382 -- Set the type of the project.
8483
8584 function Get_Project_Type
86- (Project : in out Project_Status_Type)
87- return Project_Types;
85+ (Project : in out Project_Status_Type) return Project_Types;
8886 -- Get the type of the project.
8987
9088 procedure Set_Missing_Ada_Runtime
91- (Project : in out Project_Status_Type;
92- Value : Boolean);
89+ (Project : in out Project_Status_Type; Value : Boolean);
9390 -- Should be called when the runtime for Project is found
9491
9592 procedure Set_GPR2_Messages
96- (Project : in out Project_Status_Type;
97- GPR2_Messages : GPR2.Log.Object);
93+ (Project : in out Project_Status_Type; GPR2_Messages : GPR2.Log.Object);
9894 -- Set the messages related to GPR2 project loading
9995
96+ procedure Set_Alire_Messages
97+ (Project : in out Project_Status_Type;
98+ Alire_Messages : VSS.String_Vectors.Virtual_String_Vector);
99+ -- Set the messages related to Alire project loading
100+
101+ function Get_Alire_Messages
102+ (Project : Project_Status_Type)
103+ return VSS.String_Vectors.Virtual_String_Vector;
104+ -- Get the messages related to Alire project loading
105+
100106 procedure Set_Project_File
101107 (Project : in out Project_Status_Type;
102108 Project_File : GNATCOLL.VFS.Virtual_File);
103109 -- Set the file we are trying to load
104110
105111 function Get_Project_File
106- (Project : in out Project_Status_Type)
107- return GNATCOLL.VFS.Virtual_File;
112+ (Project : in out Project_Status_Type) return GNATCOLL.VFS.Virtual_File;
108113 -- Get the project file that was loaded (or attempted)
109114
110115 function Is_Implicit_Fallback
111116 (Project : Project_Status_Type) return Boolean;
112117 -- Return True if the implicit project has been loaded
113118
114- function Is_Project_Loaded
115- (Project : Project_Status_Type) return Boolean;
119+ function Is_Project_Loaded (Project : Project_Status_Type) return Boolean;
116120 -- Return True if the project was loaded
117121
118122 function Has_New_Diagnostics
119- (Old_Project : Project_Status_Type;
120- New_Project : Project_Status_Type)
123+ (Old_Project : Project_Status_Type; New_Project : Project_Status_Type)
121124 return Boolean;
122125 -- Return True when the New_Project has a different status or different
123126 -- messages compare to Old_Project
@@ -130,8 +133,7 @@ package LSP.Ada_Project_Loading is
130133 -- Add code actions related to Project in Result
131134
132135 function Get_Diagnostics
133- (Project : Project_Status_Type)
134- return LSP.Structures.Diagnostic_Vector;
136+ (Project : Project_Status_Type) return LSP.Structures.Diagnostic_Vector;
135137 -- Compute and return the diagnostics of the project
136138
137139private
@@ -151,6 +153,10 @@ private
151153
152154 GPR2_Messages : GPR2.Log.Object := GPR2.Log.Undefined;
153155 -- The warning/error messages emitted by GPR2 while loading the project.
156+
157+ Alire_Messages : VSS.String_Vectors.Virtual_String_Vector;
158+ -- The warning/error messages related to Alire while attempting to
159+ -- load a project from a workspace that contains an alire.toml file.
154160 end record ;
155161
156162 No_Project_Status : constant Project_Status_Type :=
@@ -159,7 +165,8 @@ private
159165 Status => Valid_Project,
160166 Project_File => GNATCOLL.VFS.No_File,
161167 Missing_Ada_Runtime => False,
162- GPR2_Messages => <>);
168+ GPR2_Messages => <>,
169+ Alire_Messages => <>);
163170
164171 function Get_Load_Status
165172 (Project : Project_Status_Type) return Project_Status is (Project.Status);
0 commit comments