Skip to content
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

Meson should log a warning when attempting to set an option in an unknown subproject #14131

Open
MathieuDuponchelle opened this issue Jan 13, 2025 · 2 comments

Comments

@MathieuDuponchelle
Copy link
Contributor

Describe the bug

meson build -Dfoo=bar will not warn when no such subproject exists / is stepped into

To Reproduce

meson build -Dfoo=bar with a blank project

Expected behavior

A warning should be logged at the end of the configuration process that no such subproject was found. The user can then fix their typo, remove the -D as it is useless in their context, or of course ignore the warning

system parameters

  • what meson --version

1.4.1

@xclaesse
Copy link
Member

It is intentional to not be fatal because Meson has no way to know if it's a typo or a undiscovered sub-subproject. That being said, I think it's worth adding a note in the User defined options summary section that this option has not been used.

@MathieuDuponchelle
Copy link
Contributor Author

It is intentional to not be fatal because Meson has no way to know if it's a typo or a undiscovered sub-subproject.

I understand, but in both cases the user is setting an option that they don't need to set, so this in my opinion warrants at least a warning :)

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

No branches or pull requests

2 participants