For a description of the extension, see the GNAT reference manual.
An effort has been made to minimize the impact on parsing error recovery.
Basic benchmarking was performed and showed no observable performance
impact.
Data types in this API store analysis units directly.
This means that in order to create the config pragmas mapping for a
given project, all sources of that project + for the config pragmas
files need to be parsed. For cases like opening a project in order to
analyze only a couple of source files, this is very inefficient, both
for processing time and for memory consumption.
This commit reworks the data types to avoid this: store filenames
instead of analysis units.
This exception is raised when we find conflicting units an an aggregate
project. Enhance the exception message to incude the name of the
conflicting unit as well as two conflicting projects that include it.
Recent GPR2 transition work triggered the inclusion of absolute project
file names in test outputs. Canonicalize directory separators to avoid
failures for the expected / versus \ diffs in relevant tests.
The upcoming transition to GPR2 for the C/Python APIs will reveal
complaints about missing source directories. This is a good improvement,
but not the point of these testcases, so adjust them so that source
directories are not missing.
Some tests mean to trigger a parsing error in Ada sources. For them,
disable the printing of parsing errors in the inline playground to avoid
polluting baselines.
This commit turns on the "PLE root" Langkit mechanism to be able to run
PLE on each compilation unit independently, even if compilation units
are stored in the same source file.
In addition, it extends all the unit provider where this is possible
(Auto_Provider, Project_Provider for GPR2) so that resolving a unit
yields a filename *plus* the compilation unit index in that source file.
Finally, it adds several testcases to exercize these features.