ada_api/config_pragmas test fails on Windows
LordAro opened this issue · 3 comments
I'm getting the following test failure after running the tests on Windows (after building in production mode, with GNATPro 23.1)
Building against 41ffc1d with langkit AdaCore/langkit@200a344
I hacked in the following diff to make the output a little more useful
diff --git a/testsuite/tests/ada_api/config_pragmas/projects.adb b/testsuite/tests/ada_api/config_pragmas/projects.adb
index df4d56195..fd98e4b40 100644
--- a/testsuite/tests/ada_api/config_pragmas/projects.adb
+++ b/testsuite/tests/ada_api/config_pragmas/projects.adb
@@ -98,6 +98,8 @@ procedure Projects is
GPR2_Mapping := Import_From_Project (Ctx, Tree, View);
if Mapping /= GPR2_Mapping then
+ Dump (Mapping);
+ Put_Line ("=== Separator ===");
Dump (GPR2_Mapping);
raise Program_Error with "inconsistent results from GPR2";
end if;
Test output
INFO FAIL ada_api__config_pragmas: C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\projects.exe returned status code 1 (0 expected)
Running: gprbuild -Pgen -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XBUILD_MODE=prod -XLIBADALANG_EXTERNALLY_BUILT=true (cwd=C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas)
Status code: 0
Output:
Compile
[Ada] invalid.adb
[Ada] projects.adb
[Ada] sources.adb
Bind
[gprbind] invalid.bexch
[Ada] invalid.ali
[gprbind] projects.bexch
[Ada] projects.ali
[gprbind] sources.bexch
[Ada] sources.ali
Link
[link] invalid.adb
[link] projects.adb
[link] sources.adb
Running: 'C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\invalid.exe' (cwd=C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas)
Status code: 0
Output:
== no context==
LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE: null context
== foreign key unit==
LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE: foreign unit
== foreign value unit==
LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE: foreign unit
== foreign global==
LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE: foreign unit
== null key unit==
LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE: null unit key
== null value unit==
LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE: null unit value
Done.
Running: 'C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\projects.exe' (cwd=C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas)
Status code: 1
Output:
## gpr/c.gpr
Global pragmas at: C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\\gc.adc
Local pragmas:
C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\src\b\pkg_b.ads
-> C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\\lb.adc
C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\src\a\pkg_a.ads
-> C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\\la.adc
C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\src\a\pkg_a2.ads
-> C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\\la.adc
=== Separator ===
Global pragmas at: C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\gc.adc
Local pragmas:
C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\src\b\pkg_b.ads
-> C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\lb.adc
C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\src\a\pkg_a.ads
-> C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\la.adc
C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\src\a\pkg_a2.ads
-> C:\builds\Kii9hbKm\0\dev\rvs\libadalang\tmp\ada_api__config_pragmas\gpr\la.adc
raised PROGRAM_ERROR : inconsistent results from GPR2
The only differences I can see is the double \\
in some of the paths - is that the cause of the issue? Something missing some path normalisation?
Hello! We don’t have this issue on our side, but this rings a bell: do you use an up-to-date gnatcoll-core? In particular with this bug fix: AdaCore/gnatcoll-core@b014224
That looks about right - I'm just using the copy of GNATCOLL that comes with GNATPro 23.1, which appears to not include that fix
Great, thank you for the confirmation! In general, it’s best when building Libadalang version X to also build version X for all dependencies (xmlada, libgpr, gnatcoll-core, …).