Comments (6)
For "dependency" (/"uses") relationships though need to add the --uses
flag to your cargo modules generate graph …
command (which has --no-uses
as implicit default).
That said there currently is no way (yet) for the tool to detect dependencies from function bodies though, which is an admittedly big blind spot of the --uses
flag.
from cargo-modules.
Thank you for the information!
That said there currently is no way (yet) for the tool to detect dependencies from function bodies though, which is an admittedly big blind spot of the --uses flag.
So I wonder will this be implemented in the future?
from cargo-modules.
I very much hope so!
The tool uses rust-analyzer
(RA) as a library dependency and I simply haven't yet been able to fully figure out how walk the types used inside a function body.
The internal API of RA is mostly rather sparsely documented, and often very indirect in nature due to its extensive use of interning, which makes navigating it somewhat difficult as an outsider. As such implementing a new feature in cargo-modules
frequently turns into first having to search the RA codebase for potentially useful types and methods and then trying to figure out how to actually use them by reading through any usages within RA itself. The function body stuff has been particularly opaque so far, as it doesn't seem to work like the rest of RA. I recently found a possible approach but unfortunately ultimately couldn't manage to make it work. I'm not giving up just yet though.
Occasionally I've asked the RA devs for help on their Zulip but it feels kinda bad to ask them for customer support for their private API that isn't really intended for public use, afaict.
from cargo-modules.
I see, thank you!
from cargo-modules.
You may want to watch this one #227 😉
from cargo-modules.
Wow that looks great, thank you! 😄
from cargo-modules.
Related Issues (20)
- 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
- "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 9
- cargo-modules structure --types --traits --fns --tests ==> error: unexpected argument '--types' found HOT 1
- dependencies command panicked: impl type node HOT 5
- feat: add '--uses' ie: cargo modules structure --no-fns --no-traits --no-types --uses HOT 2
- Can cargo-modules still generate a dot-file with the module structure? HOT 3
- Feature request: dependencies --no-owns HOT 1
- Incorrectly reported orphan module HOT 1
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.