From 3b7f0c549fa97b7673693c51738c1f7cea02edb5 Mon Sep 17 00:00:00 2001 From: Jason Daming Date: Thu, 7 Nov 2024 14:52:36 -0600 Subject: [PATCH] Fix Bug With Required Dep Install (#720) --- vscode-wpilib/src/dependencyView.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vscode-wpilib/src/dependencyView.ts b/vscode-wpilib/src/dependencyView.ts index c3e3976d..28169101 100644 --- a/vscode-wpilib/src/dependencyView.ts +++ b/vscode-wpilib/src/dependencyView.ts @@ -27,12 +27,12 @@ export class DependencyViewProvider implements vscode.WebviewViewProvider { private vendorLibraries: VendorLibraries; private viewInfo: IProjectInfo | undefined; private disposables: vscode.Disposable[] = []; - private installedDeps: IJsonDependency[] = []; - private availableDeps: IJsonList[] = []; - private availableDepsList: IJsonList[] = []; - private onlineDeps: IJsonList[] = []; - private installedList: IDepInstalled[] = []; - private homeDeps: IJsonDependency[] = []; + private installedDeps: IJsonDependency[] = []; // The actual dep information that is installed + private availableDeps: IJsonList[] = []; // All available deps + private availableDepsList: IJsonList[] = []; // Only the deps that are not installed and the latest version + private onlineDeps: IJsonList[] = []; // The deps from the .json file in the vendor-json-repo + private installedList: IDepInstalled[] = []; // To display deps in the installed list + private homeDeps: IJsonDependency[] = []; // These are the offline deps in the home directory private externalApi: IExternalAPI; private ghURL = `https://raw.githubusercontent.com/wpilibsuite/vendor-json-repo/master/`; private wp: vscode.WorkspaceFolder | undefined; @@ -232,7 +232,7 @@ export class DependencyViewProvider implements vscode.WebviewViewProvider { let reqDep = undefined; // Check to see if there are required deps and install those too for (const required of dep.requires) { - reqDep = this.availableDeps.find(requiredDep => requiredDep.uuid === required.uuid); + reqDep = this.availableDepsList.find(requiredDep => requiredDep.uuid === required.uuid); const newDep = await this.listToDependency(reqDep); if (reqDep && newDep) { await this.vendorLibraries.installDependency(newDep, this.vendorLibraries.getWpVendorFolder(this.wp), true);