-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[bisected] Can no longer override subproject defaults in superproject's project() statement #7573
Comments
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
Thanks for testing master! I didn't know we could have |
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
I believe this isn't actually documented, and might've even been allowed by accident (correct me if I'm wrong). But this is useful, has worked for a while, and some projects depend on it, so I'd say it's worth promoting to an official feature. Pretty sure this used to be the only working way to override subproject defaults at some point; not sure whether it still is. |
I'm not sure we meant to enable this. Since we have support for setting default arguments to subprojects in the |
But what if you don't call |
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
the superproject This only allows the super project to do this, and not for subprojects to affect each other, as that would create race conditions and just be really difficult to make work without a two pass interpreter. This should probably be deprecated in favor of the default_options argument to subproject() anyway. Fixes mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
This is regression test for mesonbuild#7573
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: mesonbuild#7573
Describe the bug
In Meson 0.55.0 and below, it was possible to override a subproject's default options inside the superproject's
project()
statement, like so:In current git master, this is broken. Configuring such a project for the first time results in the following (irrelevant output omitted):
It seems to recognize
false
as the new "default", however it still applies the old default value to a fresh build directory, as if-Dtest_option=true
was passed explicitly. If an old build directory is--wipe
d, any such options are also reverted to their subproject defaults, unless they have been explicitly overriden at any point during the build dir's lifetime.There is also a new spurious warning
This seems to happen for every option overriden via the
project()
statement.To Reproduce
Here is a minimal test case:
meson-test-subproject-option-override-from-superproject.zip
Expected behavior
After configuring a build directory for the attached test case,
subproject:test_option
should befalse
. There should not be any warnings about missing options.system parameters
The text was updated successfully, but these errors were encountered: