Something like {a: foo} currently stymies the IntrospectionInterpreter and
breaks introspection of the source directory. The fix is just to walk the keys
and return a dummy dictionary.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation of most methods mentions method arguments enclosed in
parentheses. Two methods are an exception and we fix them here to make
the manual more consistent.
This allows the NINJA environment variable to support all the Windows special
cases, especially allowing an absolute path without extension.
Based on a patch by Yonggang Luo.
Fixes: #7659
Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Add the ids of any target that needs to be rebuilt before running the
tests as computed by the backend, to the introspection data for tests and benchmarks.
This also includes anything that appears on the test's command line.
Without this information, IDEs must update the entire build before running
any test. They can now instead selectively build the test executable
itself and anything that is needed to run it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
when that statement gets evaluated, the interpreter remembers the
version target and if it was part of the evaluation of a `if` condition
then the target meson version is temporally overriden within that
if-block.
Fixes: #7590
when the compiler is not a string. When the compiler
is set in the build configuration (required, for example,
in a cross-build setup), the compiler setting is already
a list, which is the desired type.
Signed-off-by: Matt Madison <matt@madison.systems>
This will be printed in bold at the end of interactive meson
sub-commands that won't be parsed by a program. Specifically: setup,
compile, test, and install.
NOTICE: You are using [...]
There was both a straight up bug in the type signature (the return type
is List[Callable[[], Dependency]] not List[Type[Dependency]]), and in
the way the arguments are assembled. Typing is pretty limited in it's
ability to express decorators, so the best mypy can do is check the
return types (I think). I've done what the docs suggest and it's stopped
complaining.
extra_paths only matter for the host machine if using an exe_wrapper.
However, because CustomTarget.for_machine is always MachineChoice.HOST,
they were computed unnecessarily in as_meson_exe_cmdline.
Defer computation of extra_paths until after we have found out if the
custom target executable is really for the host or the build machine,
so that we can use exe_for_machine; for_machine then becomes unused
and can be removed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This matches `meson test`, and there's really no other meaning that
could be attributed to this, since you would call `meson` to get the
version, not the `compile` sub-command.
The -Doption=value style argument works for all builtin options,
and compiler options passed to meson. And some universal options,
have additional ways to be passed. However, base options (and compiler
options) do not have exactly the same ways of passing as universal
options.
This change adds a few pieces of information, which might get lost,
if the manual is not read serially.
[skip ci]
This removes the check for "mingw" for platform.system(). The only case I know
where "mingw" is return is if using a msys Python under a msys2 mingw environment.
This combination is not really supported by meson and will result in weird errors,
so remove the check.
The second change is checking sys.platform for cygwin instead of platform.system().
The former is document to return "cygwin", while the latter is not and just
returns uname().
While under Cygwin it uname() always starts with "cygwin" it's not hardcoded in MSYS2
and starts with the environment name. Using sys.platform is safer here.
Fixes#7552