Commit graph

17 commits

Author SHA1 Message Date
Weihang Lo
33b0a24082
test(config-include): assert config merged in DFS 2023-06-21 20:18:09 +01:00
Weihang Lo
3f82ec7093
feat: check if config-include file ends with .toml
This is to avoid possible name collisions. For example, a user
creates a file called `.cargo/cache`, and then in the future
cargo wants to create a directory called `.cargo/cache/`, that
would collide with what the user specified. Restricting to `.toml`
extensions would avoid that since we won’t make a directory named
with a `.toml` extension.
2023-06-21 20:18:08 +01:00
Scott Schafer
6d429b04b9 chore: update config_include tests to use check 2023-02-20 12:20:46 -06:00
Dinu Blanovschi
0beb5fe93d Simple explanations for why cargo rebuilds crates 2022-12-28 16:27:50 +01:00
Weihang Lo
e0502e4e78
test(config-include): fix typo
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
2022-10-09 16:14:20 +08:00
Weihang Lo
e997fbc794
test(config_include): take priority over env when loaded from cli 2022-09-16 15:36:44 +01:00
Scott Schafer
c239e407e7 add a reason to masquerade_as_nightly_cargo so it is searchable 2022-07-15 21:32:23 -05:00
Jon Gjengset
39c3173619 Stabilize --config
FCP
https://github.com/rust-lang/cargo/issues/7722#issuecomment-1114369809

Closes #7722.
2022-06-17 22:46:04 +00:00
Jon Gjengset
f962ec1f44 Merge remote-tracking branch 'upstream/master' into config-cli-simple 2022-01-20 12:31:35 -08:00
Ed Page
320c279f43 Port cargo from toml-rs to toml_edit
Benefits:
- A TOML 1.0 compliant parser
- Unblock future work
  - Have `cargo init` add the current crate to the workspace, rather
    than error
  - #5586: Upstream `cargo-add`
2022-01-13 09:27:27 -06:00
Jon Gjengset
1372afc6bd Fix up config_include test 2021-12-14 19:39:03 -08:00
Eric Huss
1130bc076f Fix config includes not working. 2021-03-24 20:21:09 -07:00
Eric Huss
80e55c774b Fix tests with enoent error message on non-english systems. 2020-05-29 12:34:17 -07:00
Eric Huss
1d5d7a269f Support --config path_to_config.toml cli syntax. 2020-02-18 09:30:27 -08:00
Alex Crichton
3a18c89a55 Migrate from the failure crate to anyhow
The `anyhow` crate interoperates with the `std::error::Error` trait
rather than a custom `Fail` trait, and this is the general trend of
error handling in Rust as well.

Note that this is mostly mechanical (sed) and intended to get the test
suite passing. As usual there's still more idiomatic cleanup that can
happen, but that's left to later commits.
2020-01-07 16:50:09 -08:00
Eric Huss
00a47302dd Fixes for some test errors on Windows. 2019-12-19 09:44:02 -08:00
Eric Huss
e7eda2f91f Implement config-include. 2019-12-19 09:44:02 -08:00