-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #14196 - lschuermann:dev/config-include-enable-in-confi…
…g, 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)
- Loading branch information
Showing
2 changed files
with
170 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters