-
Notifications
You must be signed in to change notification settings - Fork 67
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
Move more definitions to the geiger crate #117
Comments
Making struct definitions public is a good thing! However, we're trying to move away from depending on cargo directly and use |
Thank you for your answer. I will take a look at |
We could probably start using the PackageId from cargo_metadata for the json serialization as a first step towards removing the dependency on the cargo library crate. Another option would be to define our own version of PackageId, at geiger::PackageId. The former would avoid defining our own PackageId, possibly causing confusion. The latter would avoid adding another dependency to the geiger crate. I'm not sure which one I prefer. Can you think of other solutions? |
PackageId from cargo_metadata crate is conceptually a black box with |
Alright, let's define our own Alternatively, we could make a new crate |
It sounds good to me to depend on a lightweight crate if you only want to parse the JSON. That's why we have |
Then a loosely coupled lightweight crate it is. TODO:
|
I reserved a crate name: https://crates.io/crates/cargo-geiger-serde |
Fixed by #125 |
It would be helpful to move more definitions from the bin crate
cargo-geiger
to the lib crategeiger
so that they can be used by integration tests (e.g. to deserialize the JSON output) and other crates. However many type definitions usePackageId
which is defined in thecargo
crate. Thegeiger
crate does not depend oncargo
and states the following in its description:Is it ok to make
geiger
depend oncargo
given that such core definitions come fromcargo
?The text was updated successfully, but these errors were encountered: