Convert BuildTarget arguments explicitly in the interpreter#15506
Draft
dcbaker wants to merge 16 commits intomesonbuild:masterfrom
Draft
Convert BuildTarget arguments explicitly in the interpreter#15506dcbaker wants to merge 16 commits intomesonbuild:masterfrom
dcbaker wants to merge 16 commits intomesonbuild:masterfrom
Conversation
`typed_kwargs` has already taken care of that for us.
Also, move `check_sources_exist` before string -> File conversion, since otherwise it does nothing.
Which should be `dict[str, str]`
It should be `list[str | IncludeDirs]`, not just `list[IncludeDirs]`
It's used, but not listed
We set this in the interpreter for Vala related arguments, but never pass it into the build layer.
Ironically, the VS backend already does this correctly.
We have the Interpreter layer which does DSL translation and the build layer has type annotations.
…format We currently sort of manipulate the dictionary in place and kinda hope everything works. This moves the conversion to be explicit, building a new dictionary (not requiring a copy) and getting help from static type checkers to ensure that everything is correct.
dnicolodi
reviewed
Jan 30, 2026
| name_suffix: T.Optional[str] | ||
| native: MachineChoice | ||
| override_options: T.Dict[OptionKey, str] | ||
| override_options: T.Dict[str, ElementaryOptionValues] |
Member
There was a problem hiding this comment.
The commit message says dict[str, str] but this is dict[str, ElementaryOptionValues]
Contributor
|
The errors seem to be always the same changes in error messages: But there's also one where the old message is better: |
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.
This allows us to have a fully functional conversion with type checking of the kwargs dictionaries between the DSL level and and the Build level of abstractions. Apart from fixing a number of incorrect or incomplete annotations, this gets us to the point that we can (mostly) validate the type checking.
This is set as draft because I'm sure there are regressions that don't show up on my system but will light CI up like a christmas tree.