Skip to content

Commit a1ace47

Browse files
Fix root project's closure processing
By making sure we include withed aggregated libraries and extended projects in its closure, to add all the project's source files at once, no matter where they are coming from. For eng/ide/ada_language_server#1598 (cherry picked from commit b985804)
1 parent 2fd9ffd commit a1ace47

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

source/ada/lsp-ada_contexts.adb

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -629,24 +629,20 @@ package body LSP.Ada_Contexts is
629629

630630
procedure Process_Closure
631631
(Root : GPR2.Project.View.Object;
632-
Callback : not null access procedure
633-
(View : GPR2.Project.View.Object))
634-
is
632+
Callback :
633+
not null access procedure (View : GPR2.Project.View.Object)) is
635634
begin
636-
-- First process the closure of the view
637-
for View of Root.Closure
638-
(Include_Self => True) when not View.Is_Runtime
635+
-- Process the closure of the root project, including any
636+
-- aggregated library and the projects that it might extend.
637+
for View
638+
of Root.Closure
639+
(Include_Self => True,
640+
Include_Extended => True,
641+
Include_Aggregated => True)
642+
when not View.Is_Runtime
639643
loop
640644
Callback (View);
641645
end loop;
642-
643-
-- If we're looking at an extending view, now
644-
-- process the closure of the extended views.
645-
if Root.Is_Extending then
646-
for V of Root.Extended loop
647-
Process_Closure (V, Callback);
648-
end loop;
649-
end if;
650646
end Process_Closure;
651647

652648
---------------------------

0 commit comments

Comments
 (0)