Skip to content

Restore 1.8.x behavior of yielding options #14800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 18, 2025
Merged

Conversation

bonzini
Copy link
Collaborator

@bonzini bonzini commented Jul 13, 2025

Meson 1.8.x makes it possible to adjust the value of a yielding option with a subproject-specific augment. This was an undocumented change which was (voluntarily) undone in commit eae4efa72 ("options: resolve yielding options at the time they are added", 2025-07-13).

Since it is useful, try to preserve it by reimplementing yielding options: store a link to the parent project option, and undo it if set_option overrides it.

Because UserOption lookup now never checks yielding, this avoids the issue from #14774 too.

@bonzini bonzini added regression options Meson configuration options labels Jul 13, 2025
@bonzini bonzini added this to the 1.8.3 milestone Jul 13, 2025
@bonzini bonzini force-pushed the fix14796 branch 3 times, most recently from b8a0046 to 61ecb87 Compare July 14, 2025 05:33
@bonzini
Copy link
Collaborator Author

bonzini commented Jul 14, 2025

This is quite a big change in how yielding options are handled, but I think I like it. yielding is only set to True if the option is actually using the yielded value.

However, the semantics of -U for project options remain confusing, in that it works only for yielding options. I added a TODO comment but the change is pretty invasive and I won't have time to work on it soon.

@bonzini bonzini marked this pull request as ready for review July 14, 2025 06:06
@bonzini bonzini requested a review from jpakkane as a code owner July 14, 2025 06:06
This makes it possible to adjust the value of the option with a
subproject-specific augment.  This was an undocumented change in 1.8
which was (voluntarily) undone in commit eae4efa72 ("options: resolve
yielding options at the time they are added", 2025-07-13), but is
useful.  This reimplementation of yielding options makes it possible
to presreve the bugfix while restoring this new feature.

Reported-by: Nirbheek Chauhan <nirbheek@centricular.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
@bonzini bonzini force-pushed the fix14796 branch 2 times, most recently from fb65525 to 405e6b1 Compare July 15, 2025 14:13
Copy link
Member

@nirbheek nirbheek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bonzini added 2 commits July 18, 2025 16:41
…on is set"

This reverts commit 9ad10ee.  The "if"
in set_option() was removed, because get_key_and_value_object_for
now always returns the subproject key and option object; remove the
function as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
@nirbheek nirbheek merged commit 4c4af10 into mesonbuild:master Jul 18, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
options Meson configuration options regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can no longer set a yielding option to a value different from the parent option's value
3 participants