Skip to content

envconfig: warn on unknown system in cross files#15951

Open
mayank-dev-15 wants to merge 1 commit into
mesonbuild:masterfrom
mayank-dev-15:3751-validate-cross-system
Open

envconfig: warn on unknown system in cross files#15951
mayank-dev-15 wants to merge 1 commit into
mesonbuild:masterfrom
mayank-dev-15:3751-validate-cross-system

Conversation

@mayank-dev-15

Copy link
Copy Markdown
Contributor

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

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
@mayank-dev-15 mayank-dev-15 requested a review from jpakkane as a code owner June 23, 2026 15:01
@bonzini bonzini added this to the 1.12 milestone Jun 23, 2026
@bonzini

bonzini commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Unit tests also have 'kfreebsd', even though it's basically dead we should be consistent.

Comment thread mesonbuild/envconfig.py
'tricore'
)

known_systems = (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better for this to be a (frozen)set?

Comment thread mesonbuild/envconfig.py
'tricore'
)

known_systems = (

@dcbaker dcbaker Jun 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be KNOWN_SYSTEMS, since it's a module constant.

Comment thread mesonbuild/envconfig.py

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')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably also needs fatal=False.

@dcbaker dcbaker modified the milestones: 1.12, 1.13 Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate and warn about unknown systems and CPU families in cross files

4 participants