You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #14196 - lschuermann:dev/config-include-enable-in-config, r=weihanglo
Allow enabling `config-include` feature in config
### What does this PR try to resolve?
Prior to this change, it is not possible to enable the unstable `config-include` flag from within a config file itself. This is due to the fact that, while cargo does reload configuration files if this flag is set, it does not parse the top-level configuration file's unstable flags before checking whether this flag is present.
This commit forces cargo to load unstable features before this check, and if the flag is present, re-loads configuration files with `config-include` enabled.
Addresses #7723 (comment).
### How should we test and review this PR?
This PR adds a testcase for this behavior to cargo's testsuite. In general, it can be replicated with a config similar to that in the testcase, or as illustrated in #7723 (comment).
### Additional information
~I'm not sure whether this is the right(TM) fix, or whether the second `self.load_unstable_flags_from_config()?;` at the bottom of `configure()` would still be required. I have a feeling it might not be, as `reload_rooted_at` also calls out to `load_unstable_flags_from_config`, to collect flags from any newly included configs. If that is not called, no other file was loaded, and thus there should not be a need to re-load unstable flags.~
Resolved: #14196 (comment)
0 commit comments