Comments (4)
Hi @asomers, and thanks for the report! You are absolutely right in that this is currently an unfortunate limitation.
The rust-analyzer API that cargo-modules currently uses for obtaining the dependencies only seems to include explicit imports. It also currently only works on module level. As such cargo-modules currently can't tell you the dependencies of say a type or function.
I'll have to see if there is some alternative function in rust-analyzer that provides a more complete picture.
from cargo-modules.
I thought it was something like that. If it can't be fixed, cie la vie.
from cargo-modules.
I'm fairly certain there should be some way to get this information out of rust-analyzer. I just couldn't find any function that directly addresses cargo-module's needs.
I'm somewhat hesitant to asking the rust-analyzer for help as they are already generous enough to share the internal unstable APIs with third-party tools like cargo-modules. Effectively asking them for free user support on top of that feels a bit wrong to me.
from cargo-modules.
Fixed by #227.
dot graph source
digraph {
graph [
label="github_issue_102",
labelloc=t,
pad=0.4,
// Consider rendering the graph using a different layout algorithm, such as:
// [dot, neato, twopi, circo, fdp, sfdp]
layout=neato,
overlap=false,
splines="line",
rankdir=LR,
fontname="Helvetica",
fontsize="36",
];
node [
fontname="monospace",
fontsize="10",
shape="record",
style="filled",
];
edge [
fontname="monospace",
fontsize="10",
];
"github_issue_102" [label="crate|github_issue_102", fillcolor="#5397c8"]; // "crate" node
"github_issue_102::a" [label="pub mod|a", fillcolor="#81c169"]; // "mod" node
"github_issue_102::a::b" [label="pub mod|a::b", fillcolor="#81c169"]; // "mod" node
"github_issue_102::a::c" [label="pub mod|a::c", fillcolor="#81c169"]; // "mod" node
"github_issue_102" -> "github_issue_102::a" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge
"github_issue_102::a" -> "github_issue_102::a::b" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge
"github_issue_102::a" -> "github_issue_102::a::b" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
"github_issue_102::a" -> "github_issue_102::a::c" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge
"github_issue_102::a" -> "github_issue_102::a::c" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge
}
from cargo-modules.
Related Issues (20)
- 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
- feat: dependency graph between files
- Does not build with latest `lsp-types` (0.94.1) HOT 4
- fails to install on windows HOT 3
- NetBSD package merged HOT 2
- Typo HOT 3
- feat: Sort by visibility HOT 3
- Analyze and forbid dependency from one mod to another? HOT 6
- "Error: Multiple packages present in workspace" but package is not a workspace HOT 1
- Installing cargo-modules 0.12.0 fails on 'ra_ap_hir_ty' HOT 13
- Fails to build for Alpine Linux (0.13.0) HOT 7
- cargo-modules structure --types --traits --fns --tests ==> error: unexpected argument '--types' found HOT 1
- dependencies command panicked: impl type node HOT 5
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.