-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
subp:opt=value in main project's default_options is overridden by opt=value from command line since meson 1.8.4 #14963
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2b2e9ed
options: put back in place 1.7 ordering of opt=value vs subp:opt=value
bonzini 42ef07c
Revert "tests: skip test common/223 in the -Ddefault_library=... jobs"
bonzini 6478fdf
Revert "test cases: do not pass global option on command line"
bonzini fba080d
docs: fix pre-1.8 order for per-subproject options
bonzini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"skip_on_env": ["MESON_TEST_DDEFAULT_LIBRARY"] | ||
"matrix": { | ||
"options": { | ||
"default_library": [ { "val": "both" } ] | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems incorrect. The command line should override anything set in project files. (given the description this list is sorted on increasing precedence)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was also what I thought when preparing the changes that went into 1.8.4. But it turns out that making two separate groups for global settings and augments (the machine file and command line winning in each group only) is more useful, and there are projects in the wild that rely on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is it more useful specifically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example you can give -Dwerror=true but meson.build can override it to false for subprojects that are known to not behave; likewise for -Dwarning_level. It is also more in line with how default_library works in pre-1.8 releases (see the reverted test changes in this PR).
Besides, we got reports like #15006 where the new ordering breaks existing projects that worked before 1.8.4. I didn't have much time to debug what exactly caused the breakage, but this patch does fix it. So, while overall the new option code is now tamed, I think this part has to be rolled back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even the documentation says so:
But the trick doesn't work anymore in 1.8.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here seems to be that the table collates two different things making it hard to comprehend. Maybe it should be split in two, with a structure like:
And maybe have the array in decreasing order of priority, as that seems to be the more logical order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even that is not unambiguously true, though I agree it's as close as you can get, because -Dopt does override "
opt=value
from subproject'sdefault_options
" which is subproject-specific. So I don't think it's much better than listing the possibilities one by one.That said do you agree now that the ordering as implemented by the patch makes sense?