-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Something like cargo query
or cargo info
for information about a registry package
#948
Comments
👍 |
Now that cargo supports external installable sub-commands, does this make more sense to add via that mechanism, rather than being built-in? That said, given that |
@felixc yeah I'd be in favor of seeing this bake externally first |
I gave this a shot: https://github.com/g-k/cargo-show. I'm curious about how people might use it and how to improve it for them. For example, I'd like to cache package GET requests like crates.io, but I'm not sure if it'd be better to use a sub command specific cache like |
@tomjakubowski Is it still desirable today considering the possibility of simply using the linked tool? |
There is also https://crates.io/crates/cargo-info which has stalled out. |
A thought I had on this command is that it We could also show either We could also show feature activation, either baesd on if Some prior art |
Looks like #6666 is covered by existing commands but could still be useful to either highlight those commands or to include their output |
The previously linked package cargo-info provides the requested functionality (thanks, @epage). In my opinion, |
Hi folks, we developed 'cargo-information' as a solution for this issue. You can try it out now. You can try it through Features:
If you have any questions, please feel free to open an issue and discuss it with us. Additionally, we are currently having several design discussions ongoing. We would appreciate your valuable input and insights. |
How does this work with other registries? I'm assuming with have to extend the standard web API for this or does this use another mechanism than API queries? |
It uses the standard download API to download it into the cargo cache dir. Then we can inspect from the local mainfist. |
Would adding a web API endpoint for a crate detail lookup functionality be an option? Could save cargo the download unzip and make the data accessible for other programs too. |
If you require to get metadata from crates.io, I think in crates.io we already have this API, but it has a very strict API rate limitation (1 request / second). The challenge here is it's very difficult to ask all the registries to implement this new API. And for Cargo, we can always download it and parse the manifest. So it seems like there isn't much enthusiasm to add that API to the registry specification. |
If the concern is with a lot of extra |
Really want this feature. Now that querying a dependent version requires a manual search to the lock file, I'm not sure if there's a better way. It would be nice to be able to use a command to actualize each of the dependent versions in the lock file |
It would be nice to be able to get the description, latest version(s), author, license, and the like, for a given registry package. Prior art includes
npm view
andgem query
.Somewhat related/complementary to #925
The text was updated successfully, but these errors were encountered: