You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Alire to import the GNATCOLL database libraries, which depend on GNATCOLL Core. However, the GNATCOLL crate has a dependency on libgpr which appears to prevent gnatprove from working.
This can be reproduced with:
alr init --bin testcase
alr with gnatcoll
alr with gnatprove
# edit main subprogram to add "with SPARK_Mode"
alr build
alr gnatprove
Phase 1 of 3: generation of data representation information ...
generation of data representation information failed
continuing analysis with partial data representation
for details, see log file gnatprove/data_representation_generation.log
Phase 2 of 3: generation of Global contracts ...
gpr-err-scanner.adb:2421:15: error: choice given incase statement is not static
2421 | when Name_Abort =>| ^~~~~~~~~~
gpr-err-scanner.adb:2421:15: error: "Name_Abort" is not a static constant (RM 4.9(5))
2421 | when Name_Abort =>| ^~~~~~~~~~
gpr-err-scanner.adb:2423:15: error: choice given in case statement is not static
2423 | when Name_Abs =>
| ^~~~~~~~
...
<many more lines>
One solution may be to disable SPARK_Mode on libgpr, alternatively a solution to either skip imported project or exclude specific project files when calling gnatprove might be useful.
We have started separating gnatcoll-core in several projects, you should depends only on gnatcoll_core.gpr rather than gnatcoll.gpr and this will remove the need for project support and thus libgpr dep
I'm using Alire to import the GNATCOLL database libraries, which depend on GNATCOLL Core. However, the GNATCOLL crate has a dependency on libgpr which appears to prevent gnatprove from working.
This can be reproduced with:
One solution may be to disable SPARK_Mode on libgpr, alternatively a solution to either skip imported project or exclude specific project files when calling gnatprove might be useful.
Relevant forum threads:
The text was updated successfully, but these errors were encountered: