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

Update options on reconfigure when default_options changes #12319

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

xclaesse
Copy link
Member

@xclaesse xclaesse commented Oct 2, 2023

Keep track of the source of each option value and only override a value with one from same or higher priority source.

This also allows fixing an inconvenient user experience in GStreamer: gst-plugins-bad subproject is optional but if user enables one of its plugins with -Dgst-plugins-bad:aom=enabled we should fail even if user forgot to pass -Dbad=enabled option to make gst-plugins-bad subproject required.

@xclaesse xclaesse force-pushed the option-source2 branch 4 times, most recently from 0841f9c to 63d97a3 Compare October 4, 2023 13:58
@xclaesse xclaesse requested a review from mensinda as a code owner October 4, 2023 13:58
It uses typed_kwargs() already in that case.
Allow convertor function to raise MesonException to validate and convert
in a single step. This avoids splitting "foo=bar" twice.
This requires storing the option value and only allow updating if the
new value comes from a higher priority source.
When using a fallback for `dependency('foo', required: false)` and the
user has set some options on the subproject via a machine file or
`-Dfoo:opt=value`, consider the user wanted to use that subproject and
make the error fatal.
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.

1 participant