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

Remove stalePods checks from dependency manager to fix rebuild issues #684

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

kmagiera
Copy link
Member

@kmagiera kmagiera commented Nov 1, 2024

In #457, we added a concept of stale pods flag, that was used to mark whether pod install command should run as a consequence of node_modules.

Since that time, I got bitten by this setting causing unexpected rebuilds to the point where some projects I'm testing run native build every single time despite no change in fingerprint.

In general I don't like the fact we are adding additional state to facilitate checks that seemingly can be done offline. From my testing, I'm now a bit confused as to what was the purpose of this flag as #457 lacks a proper description and we also don't have any inline comments about this flag and related code. Therefore I'm assuming that the purpose of it was that we trigger pod installation if we had to reinstall node_modules. However, this still seem to not be necessary, as fingerprint seems to deal with this type of scenarios well. Specifically, when we add new native dependencies that get installed in node installation phase, fingerprint will detect that and trigger native rebuild.

On top of that, this mechanism, regardless of whether I guessed the original reason for it, is there to prevent from stale builds being used. However, it still appears like it is much easier for the users to recover from issues that may arise from stale native builds than to recover from persistent rebuilds taking many minutes. In the former scenario, all you need to do is to trigger "clean build" reload. In the latter, there's no way for the user to debug that, and I experienced that myself.

Fixes # (issue)

  1. Test expo-router app, add native dependency, test again
  2. I also tested this on reanimated repo example apps with yarn and that's where I've been experiencing the described issue of consistent rebuilds.

Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 10:52pm

@kmagiera kmagiera merged commit d7e1c0d into main Nov 4, 2024
4 checks passed
@kmagiera kmagiera deleted the kmagiera/remove-stale-pods-code branch November 4, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants