Giter VIP home page Giter VIP logo

Comments (4)

g-k avatar g-k commented on June 2, 2024

I'm open to it.

Do you have an idea what the output might look like? Would we just fetch direct dependents (A > B) or indirect dependents (A > B > C) too? Something like cargo-tree?

from cargo-show.

pravic avatar pravic commented on June 2, 2024

from cargo-show.

g-k avatar g-k commented on June 2, 2024

We can start with cargo show --dependents which would output the direct dependencies like cargo tree i.e. newline delimited with indirect dependents indented with two spaces per layer.

possible example:

cargo show --dependents servo ripgrep
---
id: servo
name: servo
description: Parked non-servo thing
documentation: None
homepage: None
repository: None
max_version: 0.0.1
downloads: 1264
license: None
created: 2014-12-04T23:41:05.915728+00:00
updated: 2015-12-11T23:55:55.315022+00:00
dependencies:
---
id: ripgrep
name: ripgrep
description: Line oriented search tool using Rust's regex library. Combines the raw
performance of grep with the usability of the silver searcher.

documentation: https://github.com/BurntSushi/ripgrep
homepage: https://github.com/BurntSushi/ripgrep
repository: https://github.com/BurntSushi/ripgrep
max_version: 0.8.1
downloads: 42018
license: None
created: 2016-09-14T01:16:59.748952+00:00
updated: 2018-02-21T17:39:32.060097+00:00
dependencies:
atty ^0.2.2
bytecount ^0.3.1
...

We should already have the direct dependents in the crate deps vector: https://github.com/g-k/g-k-crates-io-client/blob/master/lib.rs#L67 but will need to verify that.

Not sure if or when I'll have time to work on this, but PRs are welcome.

from cargo-show.

pravic avatar pravic commented on June 2, 2024

Too noisy, imho Sorry, I didn't know that cargo show supports multiple arguments and misread your example.

And yes, as for the dependencies, I'd prefer something similar to cargo tree (at least, in non-verbose mode):

$ cargo show krate --dependents
...
dependencies:
├── lazy_static v1.0.1
└── libc v0.2.42

from cargo-show.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.