diff options
| author | Eli Schwartz <eschwartz93@gmail.com> | 2024-07-05 13:52:40 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-07-05 13:52:40 -0400 |
| commit | f2112d0baa379e01d7ce8a961005f5b7c102d9a9 (patch) | |
| tree | dd3ab36af18e2c78a756bcf81be15a780ed2cb6c /docs | |
| parent | 1ca002a78a48faaf74aa61fcd28b4f2fa5937b47 (diff) | |
| download | meson-f2112d0baa379e01d7ce8a961005f5b7c102d9a9.tar.gz | |
Revert "Clarify mutable objects usage"
This reverts commit 9f02d0a3e5a5ffc82256391c244b1af38e41ef78.
It turns out that this does introduce a behavioral change in existing
users of ConfigurationData, which it wasn't supposed to (it was supposed
to preserve behavior there, and add a new *warning* for
EnvironmentVariables).
This breaks projects such as pulseaudio, libvirt, and probably more.
Roll back the change and try again after 1.5.0 is released.
Fixes: #13372
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/Configuration.md | 2 | ||||
| -rw-r--r-- | docs/yaml/objects/cfg_data.yaml | 12 | ||||
| -rw-r--r-- | docs/yaml/objects/env.yaml | 13 |
3 files changed, 5 insertions, 22 deletions
diff --git a/docs/markdown/Configuration.md b/docs/markdown/Configuration.md index b5875e55e..48f071e6c 100644 --- a/docs/markdown/Configuration.md +++ b/docs/markdown/Configuration.md @@ -39,7 +39,7 @@ use a single `configuration_data` object as many times as you like, but it becomes immutable after being passed to the `configure_file` function. That is, after it has been used once to generate output the `set` function becomes unusable and trying to call it causes an error. -*Since 1.5.0* Copy of immutable `configuration_data` is however mutable. +Copy of immutable `configuration_data` is still immutable. For more complex configuration file generation Meson provides a second form. To use it, put a line like this in your configuration file. diff --git a/docs/yaml/objects/cfg_data.yaml b/docs/yaml/objects/cfg_data.yaml index 069cadbf6..03abb1709 100644 --- a/docs/yaml/objects/cfg_data.yaml +++ b/docs/yaml/objects/cfg_data.yaml @@ -1,14 +1,10 @@ name: cfg_data long_name: Configuration data object description: | - This object encapsulates configuration values to be used for generating - configuration files. A more in-depth description can be found in the - [the configuration page](Configuration.md). - - This object becomes immutable after first use. This means that - calling set() or merge_from() will cause an error if this object has - already been used in any function arguments. However, assignment creates a - mutable copy. + This object encapsulates + configuration values to be used for generating configuration files. A + more in-depth description can be found in the [the configuration wiki + page](Configuration.md). methods: - name: set diff --git a/docs/yaml/objects/env.yaml b/docs/yaml/objects/env.yaml index 3b2e2a851..714da4fe4 100644 --- a/docs/yaml/objects/env.yaml +++ b/docs/yaml/objects/env.yaml @@ -9,11 +9,6 @@ description: | on the same `varname`. Earlier Meson versions would warn and only the last operation took effect. - *Since 1.5.0* This object becomes immutable after first use. This means that - calling append(), prepend() or set() will cause a deprecation warning if this - object has already been used in any function arguments. However, assignment - creates a mutable copy. - example: | ```meson env = environment() @@ -23,14 +18,6 @@ example: | env.append('MY_PATH', '2') env.append('MY_PATH', '3') env.prepend('MY_PATH', '0') - - # Deprecated since 1.5.0 - run_command('script.py', env: env) - env.append('MY_PATH', '4') - - # Allowed and only env2 is modified - env2 = env - env2.append('MY_PATH', '4') ``` methods: |
