70 Commits

Author SHA1 Message Date
Laurent Thévenoux
74245a14be base_driver: add refiner to hide gprbuild search path info 2026-01-05 16:35:50 +01:00
Ronan Desplanques
3b9a2746b6 Add support for "finally" GNAT extension
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.
2025-12-16 10:33:33 +01:00
Pierre-Marie de Rodat
6839152cb8 Libadalang.Config_Pragmas: rework the API not to force parsing
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.
2025-11-27 15:55:28 +00:00
Pierre-Marie de Rodat
6830a1a07d Preprocessing: add handling for the new -e gnatprep switch 2025-10-01 11:56:25 +00:00
Pierre-Marie de Rodat
f39ebe979e C/Python/OCaml/Java: bind all GPR loading options 2025-09-19 11:42:47 +00:00
Pierre-Marie de Rodat
0321c2d7c9 Update test baselines after a change in gprconfig 2025-03-12 16:37:46 +00:00
Pierre-Marie de Rodat
b82edb1642 Update baselines after sloc range change for some empty lists in Langkit 2024-12-03 12:59:51 +00:00
Pierre-Marie de Rodat
90254fc629 Testsuite: canonicalize Unix/Windows output discrepancies 2024-11-19 15:22:04 +00:00
Pierre-Marie de Rodat
c1cacb1301 Project provider: give useful details with Unsupported_View_Error
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.
2024-11-18 15:12:28 +00:00
Pierre-Marie de Rodat
433fe6c7b2 Bind target information type and primitives to the Python API 2024-10-15 13:49:57 +00:00
Pierre-Marie de Rodat
48f1248dc0 Hide the sloc range for nodes in the Standard unit from Image 2024-10-11 09:37:52 +00:00
Hugo Guerrier
a8d4923f52 minor: Correct 'ada_only' Python test printing order 2024-10-10 10:06:21 +00:00
Pierre-Marie de Rodat
210f039cc6 C/Python/OCaml APIs: bind GPR2's autoconf language restriction to Ada 2024-09-06 08:00:19 +00:00
Pierre-Marie de Rodat
ce1af25ce3 Testsuite: ignore expected Unix/Windows output discrepancies
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.
2024-08-21 12:02:38 +00:00
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
fab485af06 python/gpr_error: add a dummy source to avoid warnings
"no sources in this project" warning will show up after the transition
to GPR2. They are irrelevant for this testcase, so rework it to avoid
them.
2024-08-19 13:19:44 +00:00
Pierre-Marie de Rodat
85f0b3a21b python/gpr_default_charset: add a dummy source to avoid warnings
"no sources in this project" warning will show up after the transition
to GPR2. They are irrelevant for this testcase, so rework it to avoid
them.
2024-08-19 13:19:44 +00:00
Pierre-Marie de Rodat
abaa3bb9fc Testsuite: fix project files so that source dirs exist
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.
2024-08-19 11:21:39 +00:00
Pierre-Marie de Rodat
f9b2b29394 Config pragmas: no error for queries on contexts with no mapping 2023-09-06 15:36:48 +00:00
Pierre-Marie de Rodat
167b95abe3 Preprocessing: use "blank lines" line mode for integrated preprocessor 2023-09-04 13:42:17 +00:00
Pierre-Marie de Rodat
e7e53514f6 Python API: bind Libadalang.Config_Pragmas.Set_Mappings 2023-08-14 08:35:57 +00:00
Pierre-Marie de Rodat
7019f9e90b Python API: bind Create_Context_From_Project 2023-08-01 15:31:33 +00:00
Pierre-Marie de Rodat
16295cef2c Tests: ignore parsing errors with inline playground when necessary
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.
2023-07-25 19:03:33 +00:00
Pierre-Marie de Rodat
b93ced9d69 Update baselines after a recent Langkit update 2023-06-09 12:01:39 +00:00
Pierre-Marie de Rodat
1ab5c037a8 Fix support for sources that contain multiple compilation units
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.
2023-05-25 13:05:19 +00:00