Skip to content
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

Duplicate warnings of config on Windows OS When using git-bash #14560

Closed
linyihai opened this issue Sep 18, 2024 · 3 comments · Fixed by #14579
Closed

Duplicate warnings of config on Windows OS When using git-bash #14560

linyihai opened this issue Sep 18, 2024 · 3 comments · Fixed by #14579
Assignees
Labels
A-configuration Area: cargo config files and env vars A-diagnostics Area: Error and warning messages generated by Cargo itself. C-bug Category: bug O-windows OS: Windows S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@linyihai
Copy link
Contributor

linyihai commented Sep 18, 2024

Problem

This only happend when I use the git bash and in the /tmp folder

Recently, I found the cargo on Windows will output the warnings of config twice

1、with only config exists

cargo -vV
warning: `C:\Users\ticktockit\.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`
warning: `C:\Users\ticktockit\.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`
cargo 1.83.0-nightly (c1fa840a8 2024-08-29)
release: 1.83.0-nightly
commit-hash: c1fa840a85eca53818895901a53fae34247448b2
commit-date: 2024-08-29
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.22631 (Windows 11 CoreCountrySpecific) [64-bit]
  1. both config and config.toml exist
cargo -vV
warning: both `C:\Users\ticktockit\.cargo\config` and `C:\Users\ticktockit\.cargo\config.toml` exist. Using `C:\Users\ticktockit\.cargo\config`
warning: both `C:\Users\ticktockit\.cargo\config` and `C:\Users\ticktockit\.cargo\config.toml` exist. Using `C:\Users\ticktockit\.cargo\config`
cargo 1.83.0-nightly (c1fa840a8 2024-08-29)
release: 1.83.0-nightly
commit-hash: c1fa840a85eca53818895901a53fae34247448b2
commit-date: 2024-08-29
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.22631 (Windows 11 CoreCountrySpecific) [64-bit]

Steps

  1. make sure the C:\Users\[Your PC user account]\.cargo\config exists
  2. using the git-bash
  3. cd /tmp
  4. run cargo -vV

Possible Solution(s)

It is not clear if this problem still exists in the latest version, but duplicate information needs to be removed

Notes

No response

Version

cargo 1.83.0-nightly (c1fa840 2024-08-29)
release: 1.83.0-nightly
commit-hash: c1fa840
commit-date: 2024-08-29
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.22631 (Windows 11 CoreCountrySpecific) [64-bit]

@linyihai linyihai added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Sep 18, 2024
@linyihai
Copy link
Contributor Author

@rustbot label: +O-windows

@rustbot rustbot added the O-windows OS: Windows label Sep 18, 2024
@linyihai linyihai changed the title Duplicate warnings of config on Windows OS Duplicate warnings of config on Windows OS When using git-bash Sep 18, 2024
@linyihai
Copy link
Contributor Author

The question becomes even less clear, even on my WSL subsytem, it will output the warning twice

cargo -vV
warning: `/root/.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`
warning: `/root/.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`
cargo 1.83.0-nightly (a9a418d1a 2024-09-15)
release: 1.83.0-nightly
commit-hash: a9a418d1a22f29e7dfd034e3b93f15657e608a29
commit-date: 2024-09-15
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Ubuntu 22.4.0 (jammy) [64-bit]

I don't think this output is a big deal, but I wonder if other people are having this problem, maybe it has something to do with the local configuration?

@epage epage added A-configuration Area: cargo config files and env vars A-diagnostics Area: Error and warning messages generated by Cargo itself. S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review labels Sep 18, 2024
@weihanglo weihanglo removed the S-triage Status: This issue is waiting on initial triage. label Sep 19, 2024
@linyihai
Copy link
Contributor Author

This seems will happend in the same root

C:\Users\ticktockit>cargo -vV
warning: both `C:\Users\ticktockit\.cargo\config` and `C:\Users\ticktockit\.cargo\config.toml` exist. Using `C:\Users\ticktockit\.cargo\config`
warning: both `C:\Users\ticktockit\.cargo\config` and `C:\Users\ticktockit\.cargo\config.toml` exist. Using `C:\Users\ticktockit\.cargo\config`
cargo 1.83.0-nightly (a9a418d1a 2024-09-15)
release: 1.83.0-nightly
commit-hash: a9a418d1a22f29e7dfd034e3b93f15657e608a29
commit-date: 2024-09-15
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.22631 (Windows 11 CoreCountrySpecific) [64-bit]

in the other root path, like D: disk, that won't warn twice

D:\>cargo -vV
warning: both `C:\Users\ticktockit\.cargo\config` and `C:\Users\ticktockit\.cargo\config.toml` exist. Using `C:\Users\ticktockit\.cargo\config`
cargo 1.83.0-nightly (a9a418d1a 2024-09-15)
release: 1.83.0-nightly
commit-hash: a9a418d1a22f29e7dfd034e3b93f15657e608a29
commit-date: 2024-09-15
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.22631 (Windows 11 CoreCountrySpecific) [64-bit]

I have a solution to address this.

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars A-diagnostics Area: Error and warning messages generated by Cargo itself. C-bug Category: bug O-windows OS: Windows S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants