With this change File objects created with the builtin files() function
can be used with the fs submodule like normal strings.
All methods that seem reasonable support FileOrSting arguments.
For example fs.exists() still only takes str arguments because meson
already ensures that File objects do exist when creating them with files().
Each user facing function of the fs module has an additional FeatureNew
check when used with File objects.
The test cases for fs are extended appropriately with tests for File objects.
Cross-compiling and generating gobject-introspection isn't trivial, but
with wrapper scripts that call qemu-user it's perfectly doable[1].
Currently looking up the gobject-introspection pkgconfig is done as a
native dependency, which means in cross-compilation environments this
is not the right paths (wrong library path, for example).
Solve this by generalisiing _get_native_dep() to _get_dep(native) and
asking for the host gobject-introspection instead.
[1] https://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-gnome/gobject-introspection/
This is just forcing the usage of -include as c_args, even though this
particular case can happen easily when this is provided via a dependency
cflags.
We also ensure that both the headers are included by using locale
definitions.
When pch are used for a target meson will make the compiler to include
the pre-compiled header. While this is useful, this needs to happen
before any other header has been included, otherwise:
1) we won't take advantage of pch for anything else previously included
2) gcc will just fail as it won't even try to look for a pre-compiled
header in this case [1]
This case can happen quite a easily when a dependency provides an
included header in its cflags.
As per this, split _generate_single_compile() in two phases, one is
responsible of initializing the compiler data, while the other is
defining commands for the context.
In this way, when pch can be used, we can insert the pch inclusion
earlier than any other provided by the target.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100462
If an invalid resource path is specified, then an uncaught python
exception occurs, and a backtrace is shown. Throw a MesonException
instead to produce a cleaner error message.
Add myself as a maintainer of these files since I'll be keeping them
in sync with the Vim repository.
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
This gets rid of compile warnings, and simplifies the code.
Note that `work_dir` in sanity_check_impl was incorrect,
it was used both to prepend to file names and as cwd=work_dir
argument to Popen. This is fixed here.
Closes gh-7344
This now gives a clear error rather than silently passes for
unrecognized categories, like:
python run_project_tests.py --only nonexisting
or
python run_project_tests.py --only objc # should be 'objective c'
"Stored by value" is more correct way to explain that example.
Mutable vs immutable means that you cannot mutate the value (e.g. list vs tuple in Python), and the example shows that `var2` is actually mutable.
Copying/storing a reference vs value is what what matters in the assignment, in Python `a=b` means `a` and `b` are references to the same list, while in meson `a=b` copies the value of `b` into `a`.
We need to konw on rconfigure which options have already bee set not
just for the super project, but also for the subproject. However, using
first_invocation is not sufficient, as a reconfigure could add a new
subpproject that wasn't present before, and we need to initialize that
project's builtins.
This will help facilitate cache busting in certain situations, and
replaces hand-rolled solutions of writing a length command to remove
various files/folders within the subprojects directory.