interpreter: remove use of UserFeatureOption#15626
Open
bonzini wants to merge 3 commits intomesonbuild:masterfrom
Open
interpreter: remove use of UserFeatureOption#15626bonzini wants to merge 3 commits intomesonbuild:masterfrom
bonzini wants to merge 3 commits intomesonbuild:masterfrom
Conversation
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
b43409a to
82970bf
Compare
dnicolodi
reviewed
Mar 16, 2026
Introduce a dataclass to wrap the result of get_option() for features. This removes a layering violation, where UserFeatureOptions are created outside options.py just to apply modifiers like disable_if(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
There is no need anymore to perform copies, or to check for None held_object. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
82970bf to
599a166
Compare
dnicolodi
reviewed
Mar 16, 2026
|
|
||
|
|
||
| @dataclass | ||
| class FeatureObject(HoldableObject): |
Member
There was a problem hiding this comment.
If there is a naming convention for holdable objects I haven't been able to figure it out. What about naming this class simply Feature? It would make some user visible error messages maybe a bit nicer.
Contributor
Author
There was a problem hiding this comment.
I was going by the header of https://mesonbuild.com/Reference-manual_returned_feature.html, but yeah Feature would be nicer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a dataclass to wrap the result of get_option() for features. This removes a layering violation, where UserFeatureOptions are created outside options.py just to apply modifiers like disable_if().
It's also a tiny first step towards removing the value from option objects and possibly towards fixing #2193.
Signed-off-by: Paolo Bonzini pbonzini@redhat.com