From 8b5421dc081366bc884ef5fe1ea12ba9ddb963f8 Mon Sep 17 00:00:00 2001 From: Krzysztof Magiera Date: Fri, 1 Nov 2024 14:07:40 +0100 Subject: [PATCH] Remove stalePods checks from dependency manager to fix rebuild issues --- .../src/dependency/DependencyManager.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/vscode-extension/src/dependency/DependencyManager.ts b/packages/vscode-extension/src/dependency/DependencyManager.ts index b495dc3f5..f76b6a625 100644 --- a/packages/vscode-extension/src/dependency/DependencyManager.ts +++ b/packages/vscode-extension/src/dependency/DependencyManager.ts @@ -27,11 +27,8 @@ import { CancelToken } from "../builders/cancelToken"; import { getAndroidSourceDir } from "../builders/buildAndroid"; import { Platform } from "../utilities/platform"; -const STALE_PODS = "stalePods"; - export class DependencyManager implements Disposable, DependencyManagerInterface { // React Native prepares build scripts based on node_modules, we need to reinstall pods if they change - private stalePods = extensionContext.workspaceState.get(STALE_PODS) ?? false; private eventEmitter = new EventEmitter(); private packageManagerInternal: PackageManagerInfo | undefined; @@ -140,8 +137,6 @@ export class DependencyManager implements Disposable, DependencyManagerInterface return false; } - await this.setStalePodsAsync(true); - this.emitEvent("nodeModules", { status: "installing", isOptional: false }); // all managers support the `install` command @@ -183,17 +178,10 @@ export class DependencyManager implements Disposable, DependencyManagerInterface return; } - await this.setStalePodsAsync(false); - this.emitEvent("pods", { status: "installed", isOptional: false }); Logger.debug("Project pods installed"); } - private async setStalePodsAsync(stale: boolean) { - this.stalePods = stale; - await extensionContext.workspaceState.update(STALE_PODS, stale); - } - private async getPackageManager() { if (!this.packageManagerInternal) { this.packageManagerInternal = await resolvePackageManager(); @@ -273,11 +261,6 @@ export class DependencyManager implements Disposable, DependencyManagerInterface return true; } - if (requiresNativeBuild && this.stalePods) { - this.emitEvent("pods", { status: "notInstalled", isOptional: false }); - return false; - } - const appRootFolder = getAppRootFolder(); const iosDirPath = getIosSourceDir(appRootFolder);