6 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
7c4459b84d C API: switch ada_gpr_project_* functions to GPR2
The implementation of all these functions is now backed by GPR2 instead
of GNATCOLL.Projects.
2024-08-20 08:08:38 +00:00
Pierre-Marie de Rodat
12ebf7dff6 stylechecks: check testsuite sources
Also fix existing style issues there.
2023-04-24 12:42:09 +00:00
Pierre-Marie de Rodat
935217e1b7 Libadalang.Project_Provider: extend the Source_Files function
Add a new argument (with default value, to avoid breaking the public
API) that controls the set of projects to inspect. This allows to
override the default behavior, which starts from the root project only.

Also extend the C and Python APIs accordingly. Leave the OCaml bindings
for later.
2023-04-05 08:24:06 +00:00
Pierre-Marie de Rodat
b8d5e16c38 Python API: rework GPR projects handling
This commit introduces a new class that represents a loaded project
(GPRProject), created from the usual project loading arguments (project
file, scenario variables, target and RTS info). This new class provides
two methods: create_unit_provider(project=None) to create a unit
provider wrapping a project and source_files(mode) to query the list of
source files in a project.

It also removes the now obsolete SourceFiles class (recently added), but
preserves the UnitProvider.for_project method to avoid breaking existing
user code (been there for several years).

Closes #932
2022-07-18 13:14:27 +02:00
Pierre-Marie de Rodat
9f1ee5340e python/source_files: remove OS specificities from the output
TN: UB29-005
2021-12-02 16:40:07 +01:00
Pierre-Marie de Rodat
53e4720b7b C/Python APIs: add a function to list sources from a project file
TN: UB29-005
2021-12-01 11:10:38 +01:00