Two tests are failing on Cygwin because the argument is passed as
a long-path and the Path is ending up as a short-path:
AllPlatformTests.test_run_target_files_path
Traceback (most recent call last):
File "/cygdrive/d/a/meson/meson/test cases/common/51 run target/check-env.py", line 22, in <module>
assert build_root == env_build_root
AssertionError
SubprojectsCommandTests.test_purge
> self.assertEqual(deleting(out), sorted([
str(self.subprojects_dir / 'redirect.wrap'),
str(self.subprojects_dir / 'sub_file'),
str(self.subprojects_dir / 'sub_git'),
]))
E AssertionError: Lists differ: ['/cygdrive/c/Users/runneradmin/AppData/Local/Temp/tmpeaa2a49[205 chars]git'] != ['/cygdrive/c/Users/RUNNER~1/AppData/Local/Temp/tmpeaa2a49z/s[196 chars]git']
[...]
['/cygdrive/c/Users/runneradmin/AppData/Local/Temp/tmpeaa2a49z/src/subprojects/redirect.wrap',
^^^^^^^^^^^
['/cygdrive/c/Users/RUNNER~1/AppData/Local/Temp/tmpeaa2a49z/src/subprojects/redirect.wrap',
^^^^^^^^
The fix is to not use the tempdir for all tests, but only for tests
that check the mode.
The `mkenums` functions can have this unset if, and only if, the
c file only variant is called. Due to side effects if the header file is
generated then `install_dir` is ensured to be set for the c file. I have
removed this side effect so that our tests actually cover this case.
Fixes#9472
We could have an OptionOverrideProxy of an OptionOverrideProxy,
recursively. This fix is a minimal subset of the refactoring I did in
https://github.com/mesonbuild/meson/pull/9394. Instead of faking
UserOption we can just do a shallow copy of one and set a new value on
it.
Fixes: #9448
This reverts commit c0efa7ab22.
This was a nice idea, or a beautiful hack depending on your perspective.
Unfortunately, it turns out to be a lot harder than we originally
thought. By operating on bare nodes, we end up triggering a FeatureNew
on anything that isn't a string literal, rather than anything that
isn't a string.
Since no one else has come up with a better idea for implementing a
FeatureNew, let's just revert it. Better to not have a warning, than
have it trigger way too often.
It can be either:
- boolean: the option is completely deprecated.
- list: some choices are deprecated.
- dict: some choices are deprecated and replaced by another.
Fixes: #7444
This replaces the absolute hack of using
```
install_subdir('nonexisting', install_dir: 'share')
```
which requires you to make sure you don't accidentally or deliberately
have a completely different directory with the same name in your source
tree that is full of files you don't want installed. It also avoids
splitting the name in two and listing them in the wrong order.
You can also set the install mode of each directory component by listing
them one at a time in order, and in fact create nested structures at
all.
Fixes#1604
Properly fixes#2904
This is the final refactoring for extracting the bultin object
logic out of Interpreterbase. I decided to do both arrays and
dicts in one go since splitting it would have been a lot more
confusing.
CMakes `target_link_libraries()` supports certain keywords to
only enable specific libraries for specific CMake configurations.
We now try our best to replicate this for Meson dependencies.
Fixes#9197
All changes were created by running
"pyupgrade --py3-only"
and committing the results. Although this has been performed in the
past, newer versions of pyupgrade can automatically catch more
opportunities, notably list comprehensions can use generators instead,
in the following cases:
- unpacking into function arguments as function(*generator)
- unpacking into assignments of the form x, y = generator
- as the argument to some builtin functions such as min/max/sorted
Also catch a few creeping cases of new code added using older styles.
Another commit in my quest to rid InterpreterBase from all higher
level object processing logic.
Additionally, there is a a logic change here, since `str.join` now
uses varargs and can now accept more than one argument (and supports
list flattening).
Clippy is a compiler wrapper for rust that provides an extra layer of
linting. It's quite popular, but unfortunately doesn't provide the
output of the compiler that it's wrapping in it's output, so we don't
detect that clippy is rustc. This small patch adds a new compiler class
(that is the Rustc class with a different id) and the necessary logic to
detect that clippy is in fact rustc)
Fixes: #8767
This should be done in all cases of language_stdlib_only_link_flags, but
I don't have access to all of the compilers to test it.
This is required in cases where object files created by gfortran are
linked using another compiler with a differen default search path, such
as gfortran and clang together.
This patch adds a new meson built-in option for cython, allowing it to
target C++ instead of C as the intermediate language. This can, of
course, be done on a per-target basis using the `override_options`
keyword argument, or for the entire project in the project function.
There are some things in this patch that are less than ideal. One of
them is that we have to add compilers in the build layer, but there
isn't a better place to do it because of per target override_options.
There's also some design differences between Meson and setuptools, in
that Meson only allows options on a per-target rather than a per-file
granularity.
Fixes#9015
This adds a new category of tests that does not need to run on all
platforms during CI. For now only run them on Linux runners because they
are not the bottleneck.
This removes the warning when using default_options without fallback
kwarg completely because a subproject does not know if the main project
has an implicit fallback or not, so it could set default_options even if
not fallback is available at all.
Fixes: #9278
Since we changed to using a json file to avoid over long command lines
we created a situation where the generated files may not be ready when
the depscan happens. To avoid that, we need to add all of the generated
sources as order deps.
Fixes: #9258
This requires a bit of extra code because the version might change, but
otherwise it fits in the existing AllPlatformTests.test_summary testcase
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
It is a commonly needed information to help debugging build issues. We
already were printing options with non-default value at the end of the
configure but outside of the summary.
Keeping the list of user defined options in the interpreter will also in
the future be useful to use new default value on reconfigure.