Debian Codegraph @

subprojects/meson-docs/docs/markdown/Release-notes-for-0.61.0.md

raw
1 ---
2 title: Release 0.61.0
3 short-description: Release notes for 0.61.0
4 ...
5
6 # New features
7
8 ## backend_startup_project
9
10 `backend_startup_project` will no longer erase the last project in a VS
11 solution if it is not the specified project.
12
13 ## Windows.compile_resources CustomTarget
14
15 Previously the Windows module only accepted CustomTargets with one output, it
16 now accepts them with more than one output, and creates a windows resource
17 target for each output. Additionally it now accepts indexes of CustomTargets
18
19 ```meson
20
21 ct = custom_target(
22 'multiple',
23 output : ['resource', 'another resource'],
24 ...
25 )
26
27 ct2 = custom_target(
28 'slice',
29 output : ['resource', 'not a resource'],
30 ...
31 )
32
33 resources = windows.compile_resources(ct, ct2[0])
34 ```
35
36 ## Add a man page backend to refman
37
38 The refman docs (function and object reference) can now be generated as a man
39 page.
40
41 ## ``extract_objects()`` supports generated sources
42
43 Custom targets or generated files (returned by ``generator.process()``)
44 can now be passed to ``extract_objects()``.
45
46 ## Python 3.6 support will be dropped in the next release
47
48 The final [Python 3.6 release was 3.6.15 in September](https://www.python.org/dev/peps/pep-0494/#lifespan).
49 This release series is now End-of-Life (EOL). The only LTS distribution that
50 still ships Python 3.5 as the default Python is Ubuntu 18.04, which has Python
51 3.8 available as well.
52
53 Python 3.7 has various features that we find useful such as future annotations,
54 the importlib.resources module, and dataclasses.
55
56 As a result, we will begin requiring Python 3.7 or newer in Meson 0.62, which
57 is the next release. Starting with Meson 0.61, we now print a `NOTICE:` when
58 a `meson` command is run on Python 3.6 to inform users about this.
59
60 ## Warning if check kwarg of run_command is missing
61
62 The `check` kwarg of `run_command` currently defaults to `false`.
63 Because we want to change that, running
64 ```meson
65 run_command('cmd')
66 ```
67 now results in:
68 ```text
69 WARNING: You should add the boolean check kwarg to the run_command call.
70 It currently defaults to false,
71 but it will default to true in future releases of meson.
72 See also: https://github.com/mesonbuild/meson/issues/9300
73 ```
74
75 ## `meson rewrite` can modify `extra_files`
76
77 The build script rewriter can now modify targets' `extra_files` lists,
78 or create them if absent. It it used in the same way as with rewriting
79 source lists:
80
81 ```bash
82 meson rewrite target <target name/id> {add_extra_files/rm_extra_files} [list of extra files]
83 ```
84
85 The rewriter's script mode also supports these actions:
86
87 ```json
88 {
89 "type": "target",
90 "target": "<target name>",
91 "operation": "extra_files_add / extra_files_rm",
92 "sources": ["list", "of", "extra", "files", "to", "add, remove"],
93 }
94 ```
95
96 ## `meson rewrite target <target> info` outputs *target*'s `extra_files`
97
98 Targets' `extra_files` lists are now included in the rewriter's target info dump
99 as a list of file paths, in the same way `sources` are. This applies to both
100 `meson rewrite` CLI and script mode.
101
102 ## Visual Studio 2022 backend
103
104 As Visual Studio 2022 is released recently, it's time to support the
105 new version in Meson. This mainly includes the new "v143" platform tools.
106
107 The usage is similar to other backends. For example
108 ```meson
109 meson setup builddir --backend=vs2022
110 ```
111 will configure "builddir" for projects compatible with Visual Studio 2022.
112
113 ## Support for CMake <3.14 is now deprecated for CMake subprojects
114
115 In CMake 3.14, the File API was introduced and the old CMake server API was
116 deprecated (and removed in CMake 3.20). Thus support for this API will also
117 be removed from Meson in future releases.
118
119 This deprecation only affects CMake subprojects.
120
121 ## Added support for sccache
122
123 Meson now supports [sccache](https://github.com/mozilla/sccache) just
124 like it has supported CCache. If both sccache and CCache are
125 available, the autodetection logic prefers sccache.
126
127 ## install_symlink function
128
129 It is now possible to request for symbolic links to be installed during
130 installation. The `install_symlink` function takes a positional argument to
131 the link name, and installs a symbolic link pointing to `pointing_to` target.
132 The link will be created under `install_dir` directory and cannot contain path
133 separators.
134
135 ```meson
136 install_symlink('target', pointing_to: '../bin/target', install_dir: '/usr/sbin')
137 ```
138