Now that cross-unit links between lexical envs are handled by the named
environments mechanism, we can get rid of this unsoundness without
breaking Libadalang.
TN: T320-010
Python's -O command-line option disableds the execution of "assert"
statements. In order for the generated Python bindings to work in such a
mode, we need to keep assertion logic only in "assert" statements. This
commit fixes statements that currently don't respect this principle.
Fixes GitHub issue #485
TN: U326-020
When enabled, this new option triggers the lexer engine to perform
"native" case insentivity and provides a default symbol canonicalizer
that just converts names to lower case.
TN: U118-054
The automatic trigger of PLE when synthetizing a node, while necessary
to get sound environments, creates nasty regressions in Libadalang,
which does not use the sound environment framework yet. Introduce a
switch that triggers the new behavior, and whose absence leaves the old
(and incorrect) behavior. This will allow us to continue working on
sound envs without creating regressions in LAL.
TN: TB19-017
As well as command line arguments to list/activate/deactivate them.
This will be useful for the railroad diagram pass, and can be
potentially reused for other optional passes.
Most importantly, this changes the parsing of common command line
options/flags, so that they must be passed *after* the subcommand. For
instance:
./manage.py --library-types=static make --no-gdb-hook
becomes:
./manage.py make --library-types=static --no-gdb-hook
Having some options before the subcommand and the others after have been
a serious source of confusion for both users and developpers.
This change also reorganizes subparser initialization code to reduce
code duplication in ManageScript derivations: dedicated
overridable "add_extra_subcommands" method (instead of the generic
__init__ override) and reusable "add_subbcommand" method (to create a
subcommand parser with the expected name, description and callback.
Finally, this makes it possible for some subcommands to accept unknown
arguments.
TN: T914-012
So far, ManageScript assumed that the lang_source_dir is the directory
that contains the Python source file which defines the ManageScript
subclass. This is wrong for testcases, as there is generally only one
ManageScript subclass, in the testsute/python_support/utils.py source
file.
Introduce a new "root_dir" ManageScript constructor argument to override
this behavior, and use it in the testsuite appropriately.
TN: T914-010
This commit stops considering Langkit_Support as a generated project:
* move the "langkit/support" directory to "support" (not
"langkit_support" for convenience with tab-completion);
* move the meat of the "langkit_support_gpr.mako" template to the static
"langkit_support.gpr" file, and remove the template;
* remove the "build-langkit_support.py" script and all the corresponding
libmanage.py/langkit_support.py code;
* enhance the top-level "manage.py" script to build/setenv
Langkit_Support and import the packaging tools from
"build-langkit_support.py".
From now on, Langkit_Support is a really a standalone library project,
and thus a "real" dependency for Langkit-generated libraries.
TN: T914-012
This leaves an unimplemented "langkit.lkt_lowering.create_nodes"
function and a "nodes_from_lkt" switch that tests can use to enable the
import of node definitions (nodes, fields, env specs, properties) from
Lkt files rather than from the Python DSL. Once the transition to Lkt is
over, this switch will disappear.
TN: RA22-015
In particular, rename "testsuite_support" to "drivers". This will make
it much more comfortable for developpers to use tab-completion in
shells, as there will no longer be a conflict between
"testsuite_support" and "tests" directories.
TN: T511-017
Unlike what happens on Linux, it seems that on Windows, modifying
`os.environ` in the Python interpreter has no effect on the environment
variables seen in the same process by Ada code. As a consequence, in
order for Liblktlang to have access to the desired LKT_PATH environment
variable, define it in the test drivers so that test processes inherit
it and so that Liblktlang has always access to it.
TN: RA22-015