File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
rust-analyzer/tests/slow-tests Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ pub struct CrateInfo {
10
10
pub path : String ,
11
11
}
12
12
13
+ // Feature: Show Dependency Tree
14
+ //
15
+ // Shows a view tree with all the dependencies of this project
16
+ //
17
+ // |===
18
+ // image::https://user-images.githubusercontent.com/5748995/229394139-2625beab-f4c9-484b-84ed-ad5dee0b1e1a.png[]
13
19
pub ( crate ) fn fetch_crates ( db : & RootDatabase ) -> Vec < CrateInfo > {
14
20
let crate_graph = db. crate_graph ( ) ;
15
21
crate_graph
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ fn check_lsp_extensions_docs() {
45
45
sh. read_file ( sourcegen:: project_root ( ) . join ( "docs/dev/lsp-extensions.md" ) ) . unwrap ( ) ;
46
46
let text = lsp_extensions_md
47
47
. lines ( )
48
- . find_map ( |line| line. strip_prefix ( "lsp_ext.rs hash:" ) )
48
+ . find_map ( |line| dbg ! ( line. strip_prefix( "lsp_ext.rs hash:" ) ) )
49
49
. unwrap ( )
50
50
. trim ( ) ;
51
51
u64:: from_str_radix ( text, 16 ) . unwrap ( )
Original file line number Diff line number Diff line change @@ -851,3 +851,26 @@ export interface Diagnostic {
851
851
rendered? : string ;
852
852
};
853
853
}
854
+ ```
855
+
856
+ ## Dependency Tree
857
+
858
+ ** Method:** ` rust-analyzer/fetchDependencyGraph `
859
+
860
+ ** Request:**
861
+
862
+ ``` typescript
863
+ export interface FetchDependencyGraphParams {}
864
+ ```
865
+
866
+ ** Response:**
867
+ ``` typescript
868
+ export interface FetchDependencyGraphResult {
869
+ crates: {
870
+ name: string ;
871
+ version: string ;
872
+ path: string ;
873
+ }[];
874
+ }
875
+ ```
876
+ Returns all crates from this workspace, so it can be used create a viewTree to help navigate the dependency tree.
You can’t perform that action at this time.
0 commit comments