Coming from: https://expensify.slack.com/archives/C05LX9D6E07/p1759315132607339
Proposal: Fix Podfile.lock verification by correcting JSON parsing in the existing workflow
Background
In our repository, we have a GitHub Actions workflow verifyPodfile designed to detect inconsistencies between the Podfile.lock and other dependency declarations (such as package.json and Podfile). This workflow should ensure that every Pull Request containing dependency changes does not introduce an unsynchronized Podfile.lock, preventing build failures and runtime issues.
Problem
The validatePodfile script in the workflow does not work correctly and fails to detect changes in Podfile.lock, even when they exist.
Solution
We will fix the existing script .github/scripts/removeInvalidJson.rb to correctly parse the JSON files containing information about the used pods. After this fix, the verifyPodfile workflow will properly detect inconsistencies in Podfile.lock.
This also ensures that running npm run pod-install does not generate unnecessary changes in the lockfile unrelated to the current branch.
BENEFITS
Ensuring Podfile.lock consistency prevents build failures and runtime issues. Additionally, it eliminates situations where running pod install generates unnecessary changes in the lockfile that are unrelated to the current branch.
Coming from: https://expensify.slack.com/archives/C05LX9D6E07/p1759315132607339
Proposal: Fix Podfile.lock verification by correcting JSON parsing in the existing workflow
Background
In our repository, we have a GitHub Actions workflow
verifyPodfiledesigned to detect inconsistencies between the Podfile.lock and other dependency declarations (such aspackage.jsonandPodfile). This workflow should ensure that every Pull Request containing dependency changes does not introduce an unsynchronized Podfile.lock, preventing build failures and runtime issues.Problem
The
validatePodfilescript in the workflow does not work correctly and fails to detect changes in Podfile.lock, even when they exist.Solution
We will fix the existing script
.github/scripts/removeInvalidJson.rbto correctly parse the JSON files containing information about the used pods. After this fix, theverifyPodfileworkflow will properly detect inconsistencies in Podfile.lock.This also ensures that running
npm run pod-installdoes not generate unnecessary changes in the lockfile unrelated to the current branch.BENEFITS
Ensuring Podfile.lock consistency prevents build failures and runtime issues. Additionally, it eliminates situations where running
pod installgenerates unnecessary changes in the lockfile that are unrelated to the current branch.