Skip to content

crates.io's TOML snippet with metadata produces warnings when used in Cargo.toml #8073

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

Closed
epage opened this issue Feb 6, 2024 · 2 comments · Fixed by #8082
Closed

crates.io's TOML snippet with metadata produces warnings when used in Cargo.toml #8073

epage opened this issue Feb 6, 2024 · 2 comments · Fixed by #8082
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior

Comments

@epage
Copy link

epage commented Feb 6, 2024

Current Behavior

On https://crates.io/crates/curl-sys, the following is listed

curl-sys = "0.4.71+curl-8.6.0"

Expected Behavior

On https://crates.io/crates/curl-sys, the following is listed

curl-sys = "0.4.71"

Steps To Reproduce

  1. Go to https://crates.io/crates/curl-sys
  2. See TOML snippet
  3. Add this to your Cargo.tom
  4. Run cargo check
$ cargo check
warning: /home/epage/src/personal/cargo/Cargo.toml: version requirement `0.4.71+curl-8.6.0` for dependency `curl-sys` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion

Environment

  • Browser:
  • OS:

Anything else?

No response

@Turbo87
Copy link
Member

Turbo87 commented Feb 13, 2024

Bildschirmfoto 2024-02-13 um 17 19 00

I just noticed that we're still including the build metadata in the cargo add command. it looks like cargo add can handle and ignore the build metadata, but I'm wondering whether we should remove it there too. It would be a bit more consistent with the other snippet and remove some unnecessary noise from the sidebar.

@epage
Copy link
Author

epage commented Feb 13, 2024

I agree that it should be removed for add as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants