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

Adding a crate with non-existent feature(s) #11171

Closed
maxwase opened this issue Oct 2, 2022 · 2 comments
Closed

Adding a crate with non-existent feature(s) #11171

maxwase opened this issue Oct 2, 2022 · 2 comments
Labels
C-bug Category: bug

Comments

@maxwase
Copy link
Contributor

maxwase commented Oct 2, 2022

Problem

Even though cargo shows an error, it still shows + not_exist

➜  test_add git:(master) ✗ cargo add futures --features=not_exist
    Updating crates.io index
      Adding futures v0.3.24 to dependencies.
             Features:
             + alloc
             + async-await
             + executor
             + not_exist
             + std
             - bilock
             - cfg-target-has-atomic
             - compat
             - futures-executor
             - io-compat
             - thread-pool
             - unstable
             - write-all-vectored
error: unrecognized features: ["not_exist"]

Steps

Try to add a dependency using cargo add with non-existent feature, for example

cargo add futures --features=not_exist

Possible Solution(s)

Small fix in printing

Notes

No response

Version

cargo 1.64.0 (387270bc7 2022-09-16)
release: 1.64.0
commit-hash: 387270bc7f446d17869c7f208207c73231d6a252
commit-date: 2022-09-16
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)
os: Manjaro 22.0.0 (Sikaris) [64-bit]
@maxwase maxwase added the C-bug Category: bug label Oct 2, 2022
@weihanglo
Copy link
Member

Thank you for your report! You are not the only one reported this, and really glad we already addressed it with #11098!

Closing as it has been improved.

@maxwase
Copy link
Contributor Author

maxwase commented Oct 2, 2022

Thank you for your report! You are not the only one reported this, and really glad we already addressed it with #11098!

Closing as it has been improved.

Oh, I've searched only in opened tickets, thanks for pointing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants