mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Fixing naming from graph to list
This commit is contained in:
parent
e2535926e9
commit
1b8288ff96
7 changed files with 52 additions and 48 deletions
|
@ -3,13 +3,12 @@ import * as fspath from "path";
|
|||
import * as fs from "fs";
|
||||
import { CtxInit } from "./ctx";
|
||||
import * as ra from "./lsp_ext";
|
||||
import { FetchDependencyGraphResult } from "./lsp_ext";
|
||||
import { FetchDependencyListResult } from "./lsp_ext";
|
||||
import { Ctx } from "./ctx";
|
||||
import { setFlagsFromString } from "v8";
|
||||
import * as ra from "./lsp_ext";
|
||||
|
||||
|
||||
|
||||
export class RustDependenciesProvider
|
||||
implements vscode.TreeDataProvider<Dependency | DependencyFile>
|
||||
{
|
||||
|
@ -82,8 +81,8 @@ export class RustDependenciesProvider
|
|||
private async getRootDependencies(): Promise<Dependency[]> {
|
||||
const crates = await this.ctx.client.sendRequest(ra.fetchDependencyGraph, {});
|
||||
|
||||
const dependenciesResult: FetchDependencyGraphResult = await this.ctx.client.sendRequest(
|
||||
ra.fetchDependencyGraph,
|
||||
const dependenciesResult: FetchDependencyListResult = await this.ctx.client.sendRequest(
|
||||
ra.fetchDependencyList,
|
||||
{}
|
||||
);
|
||||
const crates = dependenciesResult.crates;
|
||||
|
@ -97,7 +96,6 @@ export class RustDependenciesProvider
|
|||
}
|
||||
|
||||
private toDep(moduleName: string, version: string, path: string): Dependency {
|
||||
// const cratePath = fspath.join(basePath, `${moduleName}-${version}`);
|
||||
return new Dependency(moduleName, version, path, vscode.TreeItemCollapsibleState.Collapsed);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,9 +70,9 @@ export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void>
|
|||
|
||||
export type AnalyzerStatusParams = { textDocument?: lc.TextDocumentIdentifier };
|
||||
|
||||
export interface FetchDependencyGraphParams {}
|
||||
export interface FetchDependencyListParams {}
|
||||
|
||||
export interface FetchDependencyGraphResult {
|
||||
export interface FetchDependencyListResult {
|
||||
crates: {
|
||||
name: string;
|
||||
version: string;
|
||||
|
@ -80,11 +80,11 @@ export interface FetchDependencyGraphResult {
|
|||
}[];
|
||||
}
|
||||
|
||||
export const fetchDependencyGraph = new lc.RequestType<
|
||||
FetchDependencyGraphParams,
|
||||
FetchDependencyGraphResult,
|
||||
export const fetchDependencyList = new lc.RequestType<
|
||||
FetchDependencyListParams,
|
||||
FetchDependencyListResult,
|
||||
void
|
||||
>("rust-analyzer/fetchDependencyGraph");
|
||||
>("rust-analyzer/fetchDependencyList");
|
||||
|
||||
export interface FetchDependencyGraphParams {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue