Skip to content

Commit 3a80b47

Browse files
author
mergerepo
committed
Merge remote branch 'origin/master' into edge
(no-precommit-check no-tn-check)
2 parents 1496b66 + 624af8d commit 3a80b47

File tree

2 files changed

+9
-42
lines changed

2 files changed

+9
-42
lines changed

source/ada/lsp-ada_handlers.adb

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,23 +3298,6 @@ package body LSP.Ada_Handlers is
32983298
is
32993299
use type GNATCOLL.JSON.JSON_Value_Type;
33003300

3301-
function Match
3302-
(Left : GNATCOLL.VFS.Filesystem_String;
3303-
Right : GNATCOLL.VFS.Virtual_File) return Boolean;
3304-
-- Compare two files
3305-
3306-
-----------
3307-
-- Match --
3308-
-----------
3309-
3310-
function Match
3311-
(Left : GNATCOLL.VFS.Filesystem_String;
3312-
Right : GNATCOLL.VFS.Virtual_File) return Boolean is
3313-
begin
3314-
return (Left = "" and then Right = No_File)
3315-
or else GNATCOLL.VFS.Create (Left) = Right;
3316-
end Match;
3317-
33183301
relocateBuildTree : constant String :=
33193302
"relocateBuildTree";
33203303
rootDir : constant String :=
@@ -3430,7 +3413,6 @@ package body LSP.Ada_Handlers is
34303413
-- relative path; if so, we're assuming it's relative
34313414
-- to Self.Root.
34323415
declare
3433-
use type GNATCOLL.Projects.Project_Tree_Access;
34343416
Project_File : constant String := To_UTF_8_String (File);
34353417
GPR : Virtual_File;
34363418
begin
@@ -3440,23 +3422,13 @@ package body LSP.Ada_Handlers is
34403422
GPR := Join (Self.Root, Create_From_UTF8 (Project_File));
34413423
end if;
34423424

3443-
-- Avoid project reloading if scenario/gpr are the same
3444-
if Self.Project_Tree = null
3445-
or else Self.Charset /= Charset
3446-
or else Self.Project_Tree.Root_Project.Project_Path /= GPR
3447-
or else Self.Scenario /= Variables
3448-
or else not Match (Self.Project_Environment.Build_Tree_Dir,
3449-
Relocate)
3450-
or else not Match (Self.Project_Environment.Root_Dir, Root)
3451-
then
3452-
Self.Load_Project
3453-
(GPR,
3454-
Variables,
3455-
To_String (Charset),
3456-
Valid_Project_Configured,
3457-
Relocate,
3458-
Root);
3459-
end if;
3425+
Self.Load_Project
3426+
(GPR,
3427+
Variables,
3428+
To_String (Charset),
3429+
Valid_Project_Configured,
3430+
Relocate,
3431+
Root);
34603432
end;
34613433
end if;
34623434

@@ -3625,10 +3597,6 @@ package body LSP.Ada_Handlers is
36253597
-- We're loading an actual project
36263598
Self.Project_Status := Status;
36273599

3628-
-- Store scenario variables and charset
3629-
Self.Scenario := Scenario;
3630-
Self.Charset := To_Unbounded_String (Charset);
3631-
36323600
-- Now load the new project
36333601
Errors.a_type := LSP.Messages.Warning;
36343602
Self.Project_Environment :=

source/ada/lsp-ada_handlers.ads

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
with Ada.Containers.Hashed_Maps;
2222
with Ada.Containers.Hashed_Sets;
23-
with Ada.Strings.Unbounded;
2423
with VSS.String_Vectors;
2524

2625
with GNATCOLL.VFS; use GNATCOLL.VFS;
@@ -279,10 +278,10 @@ private
279278
Project_Status : Load_Project_Status := No_Project_Found;
280279
-- Status of loading the project
281280

282-
Scenario : LSP.Types.LSP_Any;
281+
-- Scenario : LSP.Types.LSP_Any;
283282
-- Last used scenario variables
284283

285-
Charset : Ada.Strings.Unbounded.Unbounded_String;
284+
-- Charset : Ada.Strings.Unbounded.Unbounded_String;
286285
-- Character set from didChangeConfiguration
287286

288287
Project_Dirs_Loaded : File_Sets.Set;

0 commit comments

Comments
 (0)