| Age | Commit message (Collapse) | Author |
|
|
|
Global objects are treated as UnknownValue(), but unlike other variables
their object is created on every call to get_cur_value_if_defined()
instead of coming from a dictionary. This causes the dataflow DAG
to have multiple objects from the same object. Fix this by building
the UnknownValues at interpreter construction time.
Fixes: #15261
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
We can't modify dict-valued kwargs (#14739) but this lets us at least read
them.
|
|
|
|
|
|
|
|
Without this commit, the rewriter and the static introspection tool
crash if `meson.build` contains something like
```meson
if false
foo = not_defined
endif
```
or
```meson
if false
message(not_defined)
endif
```
While it could be argued, that you should not write stuff like this,
this used to raise a `MesonBugException`, which we have to fix.
Fixes #14667
|
|
Change the semantics of IntrospectionBuildTarget.source_nodes
and IntrospectionBuildTarget.extra_files .
The rewriter and the static introspection tool used to be very broken,
now it is *less* broken, hence we add some tests in this commit.
Fixes #11763
|
|
Make the AstInterpreter create a directed acyclic graph (called
`dataflow_dag`) that stores the how the data flowes from one node in
the AST to another.
Add `AstInterpreter.node_to_runtime_value` which uses `dataflow_dag`
to find what value a variable at runtime will have.
We don't use dataflow_dag or node_to_runtime_value anywhere yet, but
it will prove useful in future commits.
|
|
The order in which the rewriter outputs the listed sources is more or
less arbitrary anyways, so we ignore it to prevent the tests from
breaking after small irrelevant changes.
|
|
|
|
This was only being used by the introspection interpreter, which meant
the two interpreters had different behavior. They still do, which is
really bad because the IntrospectionInterpreter doesn't have the command
line options or project_default_options. I have a plan to fix that
later, and I don't want to spend time on it here, as it's not a
regression of this patch, it's just the status quo.
This also fixes an issue caused by dead code being left, and hit, due to
the option refactor branch.
Fixes: #14382
|
|
"prefix" has a lot of special handling that has to go on because so many
other options depend on prefix. It was also regressed by the option
refactor changes, so having a test feels appropriate.
This was verified against the 1.7 release, so it has the same behavior
as pre-option refactor Meson.
|
|
|
|
Send the info to stdout, where it belongs.
|
|
|
|
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
|
|
|
|
this printer preserves all whitespaces and comments in original meson.build file. It will be useful for rewrite and potential auto-formatter
|
|
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
unittests/rewritetests.py:19: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.dir_util import copy_tree
|
|
|
|
|
|
Add ability to mutate a target's `extra_files` list through the
rewriter.
The logic is copied from sources add/rm, but changes the `extra_files`
kwarg instead of the sources positional argument.
Has additional logic to handle creating the `extra_files` list if it
doesn't exist.
|
|
and clean up all outstanding issues
Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
|
|
|