Comments (2)
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.
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)
- Failed to install the latest version HOT 2
- Doesn't generate uses edges for fully namespaced components HOT 4
- Explain colors HOT 1
- Dependency Dashboard
- Action Required: Fix Renovate Configuration
- Cargo install fails for latest version 0.5.12 HOT 14
- Allow generating tree/graph for a union of subgraphs of the project HOT 3
- Failed to install cargo-modules `0.6.0` HOT 2
- Option to remove external nodes? HOT 11
- Typo? HOT 1
- Add `--use-parents` option? HOT 1
- Installation error HOT 1
- Feature: Add module grouping/Reflection model HOT 2
- Wrong "uses" edges for reexported inner modules' types HOT 2
- Analyze crates in non-test mode (again) HOT 3
- Install cargo-modules fails HOT 3
- Crate does not compile with latest rust suite 1.55 HOT 1
- Option to disable module nodes in graph HOT 4
- Disable panic backtrace if an error occured HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-modules.