Skip to content

Commit

Permalink
Remove stalePods checks from dependency manager to fix rebuild issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Nov 1, 2024
1 parent e1de19f commit 8b5421d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/vscode-extension/src/dependency/DependencyManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>(STALE_PODS) ?? false;
private eventEmitter = new EventEmitter();
private packageManagerInternal: PackageManagerInfo | undefined;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 8b5421d

Please sign in to comment.