envconfig: warn on unknown system in cross files#15951
Open
mayank-dev-15 wants to merge 1 commit into
Open
Conversation
CPU family validation already warned on unknown values. Add the same check for the system field so cross-file authors get feedback when they use non-standard system names. Also adds a known_systems tuple documenting all supported values. Fixes mesonbuild#3751
Contributor
|
Unit tests also have |
dnicolodi
reviewed
Jun 23, 2026
| 'tricore' | ||
| ) | ||
|
|
||
| known_systems = ( |
Member
There was a problem hiding this comment.
Wouldn't it be better for this to be a (frozen)set?
dcbaker
reviewed
Jun 29, 2026
| 'tricore' | ||
| ) | ||
|
|
||
| known_systems = ( |
Member
There was a problem hiding this comment.
This should also be KNOWN_SYSTEMS, since it's a module constant.
dcbaker
reviewed
Jun 29, 2026
|
|
||
| system = literal['system'] | ||
| if system not in known_systems: | ||
| mlog.warning(f'Unknown system {system}, please report this at https://github.com/mesonbuild/meson/issues/new') |
Member
There was a problem hiding this comment.
This probably also needs fatal=False.
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.
CPU family validation already warned on unknown values. Add the same check for the system field so cross-file authors get feedback when they use non-standard system names.
Also adds a known_systems tuple documenting all supported values.
Fixes #3751