Fix more option regressions#14549
Merged
dcbaker merged 7 commits intomesonbuild:masterfrom May 6, 2025
Merged
Conversation
bruchar1
reviewed
May 2, 2025
Member
|
Change the milestone to 1.8.1, otherwise they script does not take these commits to that release (which it clearly should). |
eli-schwartz
reviewed
May 4, 2025
Member
|
From a quick look this all seems right to me, and regression fixes are top priority for backporting indeed. |
Member
|
Rebasing should fix the CI. |
This was referenced May 5, 2025
dcbaker
reviewed
May 5, 2025
dcbaker
reviewed
May 5, 2025
dcbaker
approved these changes
May 5, 2025
Member
dcbaker
left a comment
There was a problem hiding this comment.
I have a few suggestions but they can be addressed later since this is correct as is, and fixes regressions.
bruchar1
reviewed
May 6, 2025
Fixes: mesonbuild#14528 Signed-off-by: Paolo Bonzini <[email protected]>
Something like
subproject('sub', default_options: ['sub2:from_subp=true'])
will cause an assertion failure due to "key.subproject is None"
obviously being false. Just support this, since it's easy to do so.
No code changes, just making mypy annotations truthful. Signed-off-by: Paolo Bonzini <[email protected]>
Always use a dictionary (even though later OptionStore will convert it back to list for hackish historical reasons) to make it easy to apply overrides. Long term we probably want OptionStore to not know about T.List[str] at all, anyway. Signed-off-by: Paolo Bonzini <[email protected]>
Apply the default_library=... default after the default options have been converted to a dictionary, to avoid having to deal with all the possible types of the default_options keyword argument. Fixes: mesonbuild#14532 Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Contributor
Author
|
The only change from the approved version is diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 77199a757..8fb660d1f 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -883,9 +883,7 @@ class Interpreter(InterpreterBase, HoldableObject):
if isinstance(default_options, list):
default_options = dict((x.split('=', 1) for x in default_options))
if extra_default_options:
- default_options = copy.copy(default_options)
- for k, v in extra_default_options.items():
- default_options.setdefault(k, v)
+ default_options = {**extra_default_options, **default_options}
if subp_name == '':
raise InterpreterException('Subproject name must not be empty.')So the failure should be transient?? It does not show up in #14559. |
dcbaker
approved these changes
May 6, 2025
Member
|
still LGTM. I kicked the one CI job, we'll see if that clears up |
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.
Fixes: #14528
Fixes: #14532
And also fixes an assertion failure that I triggered while writing tests.