AdaCore / gpr

The framework for analyzing the GNAT Project (GPR) files
Apache License 2.0
17 stars 9 forks source link

How to get `with` of GPR using the C bindings #7

Closed Heziode closed 7 months ago

Heziode commented 1 year ago

The title speaks for itself, I try to get the within of a GPR using the C binding, but I do not find any method that doing that.

From the Ada lib, the project (Project.View.Object) contains a Has_Imports method and Imports list, but I do nod find a way to access to it using the C binding.

Furthermore, the documentation has missing type declarations (into the README) for Units and Sources.

lambourg commented 7 months ago

The Python bindings are missing most features currently. The current stage is a proof of concept that will be enhanced to cover more API later on. Note that alternatively you can run gprinspect on your project tree: it displays information on the GPR tree you want to load, and can do so using a JSON format that can then be parsed easily in python.

Heziode commented 7 months ago

I am not sure to understand, I am talking about C binding, not Python.

The use of PGRInspect is just a workaround, since the benefit of C binding is to integrate it to a bigger program.

lambourg commented 7 months ago

well, the two are tightly linked, since the C binding is there primarily as a service to the python binding. Now as the two are linked, then yes, this will be completed later on, we just don't have the manpower to do it right now, so this will have to wait unfortunately.