Closed
Description
Problem
If you have a ~/.cargo/config file, running Cargo commands gives this:
warning: `/home/chris/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
But if you follow this advice, you get a warning:
warning: both `/home/chris/.cargo/config` and `/home/chris/.cargo/config.toml` exist. Using `/home/chris/.cargo/config`
Well, actually everything produces these warnings and infos twice, so it’s even a little worse.
A suggested course of action shouldn’t lead to a different warning. Currently, I can’t escape having a warning if I want to support cargo 1.38 or earlier.
Steps
No response
Possible Solution(s)
Suppress the new warning if config
and config.toml
have the same contents. (This is more general than just checking if one symlinks the other.)
Notes
No response
Version
warning: both `/home/chris/.cargo/config` and `/home/chris/.cargo/config.toml` exist. Using `/home/chris/.cargo/config`
warning: both `/home/chris/.cargo/config` and `/home/chris/.cargo/config.toml` exist. Using `/home/chris/.cargo/config`
cargo 1.79.0-nightly (c93926759 2024-04-23)
release: 1.79.0-nightly
commit-hash: c9392675917adc2edab269eea27c222b5359c637
commit-date: 2024-04-23
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.3 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Arch Linux [64-bit]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment