| Age | Commit message (Collapse) | Author |
|
Comparing the implementation of build_subdir with
https://github.com/mesonbuild/meson/pull/12258, both of them introduced
a similar separation between srcdir and builddir. There were some
differences in the choices of srcdir vs builddir; this commit tries to
identify which are bugs in which implementation, and get the best of
both worlds.
|
|
Another place where the interpreter is accessed surreptitiously is
dependency introspection, which looks at the variables. Do that
at setup time instead while the interpreter is alive.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The interpreter's build_def_files are the only remaining piece
of interpreter state used by the backend. Compute it once
and store it in build, using a property to ensure that it's initialized
and accessed correctly.
This also removes one of the cases in which introspection uses the
interpreter object.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
There are a lot of spelled out unions for these types, lets reduce that
number
|
|
UnknownValue
It is not the build layer's job to handle ast types, so instead filter
out UnknownValues before passing them to the build layer, then fix up
any special values we need in the ast layer. This reveals that some of
what we were previously doing only works because the build layer is
pretty much untyped, if it was typed it would have screamed loudly.
|
|
This reverts commit 12563f74a9f3dda70dcd4778aa958de355d1fae7.
|
|
This is required by meson-python to fix RPATH entries when building a wheel.
|
|
This commit completes 5de09cbe8838e8febf1ca3aa83b53cf06972bff3,
ensuring that only POSIX style paths are passed to the compiler
line, and thus fixing UNIX-style tools that treat single
backward slashes as Unicode escaped characters.
Fixes #12191
Completes #12534
Completes #12564
|
|
Without this commit, the static introspection tool crashes when
introspecting systemd since certain values are `UnknownValue`
which was unexpected.
(I tested sytemd's commit hash fefcb935cd.)
|
|
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
|
|
`resolve_node` is simply a half-broken, worse implementation of
`node_to_runtime_value` that we recently introduced.
In the example below, the static introspection tool/rewriter now
understands that the name of the executable is foo instead of bar:
```
var = 'foo'
name = var
var = 'bar'
executable(name, 'foo.c')
```
|
|
To improve type-safety and readability we replace a
dictionary with a new class `IntrospectionDependency`.
|
|
To improve type-safety and readability we replace a
dictionary with a new class `IntrospectionBuildTarget`.
|
|
|
|
|
|
|
|
This is an old method, that is now just a wrapper around the OptionStore
method, that doesn't add any value. It's also an option related method
attached to the CoreData instead of the OptionStore, so useless and a
layering violation.
|
|
This also makes KeyedOptionDictType obsolete and it's removed
|
|
|
|
The fact that UserOption is generic is really an implementation detail,
not something to be used publicly. So by having an `AnyOptionType`
alias, we can get better type checking, as can be seen by the patch as a
whole. One of the big fixes it replace open-coded equivlalents of
`MutableKeydOptionDictType` with that type alias.
|
|
They are very similar, but they are not exactly the same. By splitting
them we can get full type safety, and run mypy over the options.py file!
|
|
This will allow us to take choices out of the UserOption class, which
doesn't actually use this attribute.
|
|
This provides a method to get choices for options in a printable form.
The goal is to make refactoring options simpler.
|
|
Even though the "targets" introspection info already includes the
command line arguments used to invoke the compiler, this is not
enough to correlated with the "compilers" introspection info and
get extra information from there.
Together with the existing "language" key, adding a "machine" key
is enough to identify completely an entry in the compilers info.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Filipe Laíns <lains@riseup.net>
|
|
|
|
this will allow transforming string types in the formater
|
|
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
|
|
line argument code
|
|
|
|
|
|
use separate Node for multiline strings
|
|
Compiler checks were not adding build dir side, which prevents using
headers generated with configure_file().
|
|
Performed using https://github.com/ilevkivskyi/com2ann
This has no actual effect on the codebase as type checkers (still)
support both and negligible effect on runtime performance since
__future__ annotations ameliorates that. Technically, the bytecode would
be bigger for non function-local annotations, of which we have many
either way.
So if it doesn't really matter, why do a large-scale refactor? Simple:
because people keep wanting to, but it's getting nickle-and-dimed. If
we're going to do this we might as well do it consistently in one shot,
using tooling that guarantees repeatability and correctness.
Repeat with:
```
com2ann mesonbuild/
```
|
|
Make them into real type annotations. These are the only ones that if
automatically rewritten, would cause flake8 to error out with the
message: "E128 continuation line under-indented for visual indent".
|
|
|
|
Mostly detected with flake8-type-checking. Also quote T.cast() first
arguments, since those are not affected by future annotations.
|
|
This detects cases where module A imports a function from B, and C
imports that same function from A instead of B. It's not part of the API
contract of A, and causes innocent refactoring to break things.
|
|
|
|
- add `extra_paths` to intro-tests.json to know paths needed to run a
test on Windows;
- add `depends` to alias targets in intro-targets.json to know what
targets does an alias point to;
- add `depends` to intro-dependencies.json to know libraries linked with
an internal dependency;
- renamed `deps` to `dependencies` in `intro-dependencies.json` for more
uniformity.
|