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

Allow checking only library, not bin #93

Open
jyn514 opened this issue Feb 3, 2020 · 3 comments
Open

Allow checking only library, not bin #93

jyn514 opened this issue Feb 3, 2020 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@jyn514
Copy link

jyn514 commented Feb 3, 2020

I want to run cargo geiger on the tree_magic library. However, geiger tries to run on the binary as well, leading to a compile error:

error[E0463]: can't find crate for `clap`
  --> src/main.rs:25:1
   |
25 | extern crate clap;
   | ^^^^^^^^^^^^^^^^^^ can't find crate

I think it may not be respecting the required-features = ["cli"] line in Cargo.toml, but any case I would expect --lib not to count the lines of unsafe in src/main.rs.

@anderejd anderejd added bug Something isn't working help wanted Extra attention is needed labels Feb 4, 2020
@anderejd
Copy link
Contributor

anderejd commented Feb 4, 2020

Thanks for the report!

@mmou
Copy link

mmou commented Apr 9, 2020

Hey I'm new to these repos, but I had trouble reproducing this bug.

HEAD (fcbb9592de0104e7fe6b9a580839f360a2fddbc8) of tree_magic master is not building, so I checked out e267314, and ran cargo geiger --features=cli, but i did not see the can't find crate error you got above.

@jyn514
Copy link
Author

jyn514 commented Apr 9, 2020

Run without --features=cli and you should get the error: cargo geiger --lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants