Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Bug With Required Dep Install #720

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions vscode-wpilib/src/dependencyView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <year>.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;
Expand Down Expand Up @@ -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);
Expand Down