Giter Site home page Giter Site logo

Comments (3)

regexident avatar regexident commented on July 3, 2024

The new CLI's equivalent would be this:

cargo modules dependencies [OPTIONS] > mods.dot

while the opt-in flags have been replaced with corresponding opt-out flags:

--no-externs    Filter out extern items from extern crates from graph
--no-fns        Filter out functions (e.g. fns, async fns, const fns) from graph
--no-modules    Filter out modules (e.g. `mod foo`, `mod foo {}`) from graph
--no-sysroot    Filter out sysroot crates (`std`, `core` & friends) from graph
--no-traits     Filter out traits (e.g. trait, unsafe trait) from graph
--no-types      Filter out types (e.g. structs, unions, enums) from graph
--no-uses       Filter out "use" edges from graph

So if you're only interested in modules, the you'd have to opt out of everything else:

cargo modules dependencies --no-externs --no-fns --no-sysroot --no-traits --no-types --no-uses > mods.dot

from cargo-modules.

barafael avatar barafael commented on July 3, 2024

Oof. Thanks for patiently clarifying!

from cargo-modules.

regexident avatar regexident commented on July 3, 2024

Unfortunately there is no one-size-fits-all when it comes to those flag defaults and I found myself pretty much always using just about all the opt-ins, which from what I can tell also seems to match most other people's usages.

Having them as opt-out also results in β€”I thinkβ€” improved CLI accessibility as you're much more likely to miss out of an opt-in feature than you are on one that's opt-out, which was the second major reason for the change.

There is also a little bit more information in the corresponding CHANGELOG entry.

from cargo-modules.

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.