Giter Site home page Giter Site logo

Comments (2)

EdmundsEcho avatar EdmundsEcho commented on August 24, 2024

So, once I add a [lib] entry in cargo, it punches out what I would expect:

> cargo modules generate tree --package oauth --lib

crate oauth
├── mod config: pub
├── mod constants: pub(crate)
├── mod errors: pub(crate)
├── mod handlers: pub(crate)
│   ├── mod authenticate: pub
│   ├── mod authorize: pub
│   ├── mod drive_authorized: pub
│   ├── mod favicon: pub
│   ├── mod filesystem: pub
│   ├── mod login_authorized: pub
│   ├── mod logout: pub
│   └── mod shared: pub(self)
├── mod middleware: pub(crate)
│   └── mod print_response: pub
├── mod models: pub(crate)
│   ├── mod auth_failed_redirect: pub
│   ├── mod auth_redirect: pub
│   ├── mod auth_return: pub
│   ├── mod drive_clients: pub
│   ├── mod drive_provider: pub
│   ├── mod drive_token: pub
│   ├── mod files: pub
│   ├── mod message: pub
│   ├── mod oauth_clients: pub
│   ├── mod oauth_provider: pub
│   ├── mod project_id: pub
│   ├── mod user: pub
│   └── mod user_registration: pub
└── mod state: pub(crate)

I wonder if this output should not be what we see without the lib entry given main.rs clearly has access to these modules. If not, some sort of warning/FYI?

from cargo-modules.

regexident avatar regexident commented on August 24, 2024

Hi @EdmundsEcho, thanks for the detailed feedback, it is much appreciated!

Since (if I understand your project correctly) the modules are strictly speaking part of the oauth library, rather than the oauth binary (and only pulled in via an implicit dependency between bin and lib).

As such when running generate tree they are not considered at all (due to being "extern"), and when running generate graph only when running with --with-externs.

The generate tree command only traverses owns relationships (as compared to depends on, which generate graph also supports), as otherwise the traversal might end up with cycles and thus not be a tree anymore.

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.