A module for Qt6 is now available with the same functionality as the Qt5
module.
Currently finding Qt6 is only available via `qmake` as pkg-config files aren't
generated (see [QTBUG-86080](https://bugreports.qt.io/browse/QTBUG-86080)) and
CMake support is not available for this module yet.
## Unstable Rust module
A new unstable module has been added to make using Rust with Meson easier.
Currently, it adds a single function to ease defining Rust tests, as well as a
wrapper around bindgen, making it easier to use.
## Meson test() now accepts `protocol : 'rust'`
This allows native Rust tests to be run and parsed by Meson; simply set the
protocol to `rust` and Meson takes care of the rest.
## MSVC/Clang-Cl Argument Changes/Cleanup
* "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC).
* "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default
* Clang-CL `debug` buildtype arguments now match MSVC arguments
* There is now no difference between `buildtype` flags and `debug` + `optimization` flags
The /Od flag has been removed, as it is already the default in the MSVC compilers, and conflicts with other user options.
/RTC1 conflicts with other RTC argument types as there are many different options, and has been removed by default.
Run Time Checking can be enabled by manually adding `/RTC1` or other RTC flags of your choice.
The `debug` buildtype for clang-cl added additional arguments compared to MSVC, which had more to do with optimization than debug. The arguments removed are `/Ob0`, `/Od`, `/RTC1`. (`/Zi` was also removed, but it is already added by default when debug is enabled.)
If these are important issues for you and would like builtin toggle options,
please file an issue in the Meson bug tracker.
## Buildtype remains even if dependent options are changed
Setting the `buildtype' option to a value sets the `debug` and
`optimization` options to predefined values. Traditionally setting the
options to other values would then change the buildtype to `custom`.
This is confusing and means that you can't use, for example, debug
level `g` in `debug` buildtype even though it would make sense under
many circumstances.
Starting with this release, the buildtype is only changed when the user
explicitly sets it; setting the build type modifies the `debug` and
`optimization` options as before.
## Passing internal dependencies to the compiler object
Methods on the compiler object (such as `compiles`, `links`, `has_header`)
can be passed dependencies returned by `declare_dependency`, as long as they
only specify compiler/linker arguments or other dependencies that satisfy
the same requirements.
## `unstable_external_project` improvements
- Default arguments are added to `add_project()` in case some tags are not found
in `configure_options`: `'--prefix=@PREFIX@'`, `'--libdir=@PREFIX@/@LIBDIR@'`,
and `'--includedir=@PREFIX@/@INCLUDEDIR@'`. It was previously considered a fatal
error to not specify them.
- When the `verbose` keyword argument is not specified, or is false, command outputs
are written on file in `<builddir>/meson-logs/`.
- The `LD` environment variable is not passed any more when running the configure
script. It caused issues because Meson sets `LD` to the `CC` linker wrapper but
autotools expects it to be a real linker (e.g. `/usr/bin/ld`).
## `gnome.post_install()`
Post-install update of various system wide caches. Each script will be executed
only once even if `gnome.post_install()` is called multiple times from multiple
subprojects. If `DESTDIR` is specified during installation all scripts will be
skipped.
Currently supports `glib-compile-schemas`, `gio-querymodules`, and
`gtk-update-icon-cache`.
## "Edit and continue" (/ZI) is no longer used by default for Visual Studio
Meson was adding the `/ZI` compiler argument as an argument for Visual Studio
in debug mode. This enables the `edit-and-continue` debugging in
Visual Studio IDE's.
Unfortunately, it is also extremely expensive and breaks certain use cases such
as link time code generation. Edit and continue can be enabled by manually by
adding `/ZI` to compiler arguments.
The `/ZI` argument has now been replaced by the `/Zi` argument for debug builds.
If this is an important issue for you and would like a builtin toggle option,
please file an issue in the Meson bug tracker.
## Minimum required Python version updated to 3.6
Meson now requires at least Python version 3.6 to run as Python 3.5
reaches EOL on September 2020. In practice this should only affect
people developing on Ubuntu Xenial, which will similarly reach EOL in
April 2021.
## Packaging a subproject
The `meson dist` command can now create a distribution tarball for a subproject
in the same git repository as the main project. This can be useful if parts of
the project (e.g. libraries) can be built and distributed separately. In that
case they can be moved into `subprojects/mysub` and running `meson dist` in that
directory will now create a tarball containing only the source code from that
subdir and not the rest of the main project or other subprojects.
For example:
```sh
git clone https://github.com/myproject
cd myproject/subprojects/mysubproject
meson builddir
meson dist -C builddir
```
## `custom_target()` and `run_target()` now accepts an `env` keyword argument
Environment variables can now be passed to the `custom_target()` command.
```meson
env = environment()
env.append('PATH', '/foo')
custom_target(..., env: env)
custom_target(..., env: {'MY_ENV': 'value'})
custom_target(..., env: ['MY_ENV=value'])
```
## `summary()` accepts external programs or dependencies
External program objects and dependency objects can be passed to
`summary()` as the value to be printed.
## CMake `find_package` version support
It is now possible to specify a requested package version for the CMake
dependency backend via the new `cmake_package_version` kwarg in the
`dependency` function.
## `meson test` only rebuilds test dependencies
Until now, `meson test` rebuilt the whole project independent of the
requested tests and their dependencies. With this release, `meson test`
will only rebuild what is needed for the tests or suites that will be run.
This feature can be used, for example, to speed up bisecting regressions
using commands like the following:
git bisect start <brokencommit><workingcommit>
git bisect run meson test <failingtestname>
This would find the broken commit automatically while at each step
rebuilding only those pieces of code needed to run the test.
However, this change could cause failures when upgrading to 0.57, if the
dependencies are not specified correctly in `meson.build`.
## The `add_*_script` methods now accept a File as the first argument
Meson now accepts `file` objects, including those produced by
`configure_file`, as the first parameter of the various