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

Cargo error message when depending on binary crate should be better #4226

Closed
Boscop opened this issue Jun 26, 2017 · 3 comments
Closed

Cargo error message when depending on binary crate should be better #4226

Boscop opened this issue Jun 26, 2017 · 3 comments
Labels
A-crate-dependencies Area: [dependencies] of any kind A-diagnostics Area: Error and warning messages generated by Cargo itself. S-triage Status: This issue is waiting on initial triage.

Comments

@Boscop
Copy link

Boscop commented Jun 26, 2017

If one tries to depend on a binary crate the error message is currently "can't find crate" but it should be "can't depend on binary crates" or similar.

@alexcrichton alexcrichton added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label Jun 26, 2017
@dwijnand
Copy link
Member

This doesn't error any more. For example depending on hexyl = "0.4.0" now just succeeds:

08:03:03 $ cargo b
    Updating crates.io index
  Downloaded hexyl v0.4.0
   Compiling t-cargo-dep-on-binary v0.1.0 (/s/t-cargo-dep-on-binary)

@ehuss ehuss added the A-crate-dependencies Area: [dependencies] of any kind label Jun 25, 2020
@epage epage added the S-triage Status: This issue is waiting on initial triage. label May 24, 2023
@epage
Copy link
Contributor

epage commented May 24, 2023

From #7825, I'm assuming this will now warn about "no linkable targets". We need to confirm this is resolved

@weihanglo
Copy link
Member

This has been improved with #9771. Now it looks like

    Updating crates.io index
  Downloaded term_size v0.3.2
  Downloaded ctrlc v3.4.0
  Downloaded hexyl v0.4.0
  Downloaded 3 crates (39.7 KB) in 1.09s
warning: x v0.1.0 (/projects/x) ignoring invalid dependency `hexyl` which is missing a lib target
    Finished dev [unoptimized + debuginfo] target(s) in 6.00s

Close as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-crate-dependencies Area: [dependencies] of any kind A-diagnostics Area: Error and warning messages generated by Cargo itself. S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

6 participants