question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[$2000] Create automated check to catch uncommitted changes to `Podfile.lock`

See original GitHub issue

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Problem

When a developer adds, removes, or updates a package in a PR, there will always be a diff in package.json and package-lock.json, and the changes in both must be committed. Depending on the package, there may or may not be a diff in ios/Podfile.lock as well. Sometimes developers forget to run pod install when modifying a package, so the potential diff in ios/Podfile.lock is not caught until after the PR is merged and a different developer runs pod install. This can lead to confusion.

We have an existing GitHub Action workflow verifyPodfile.yml that uses the script (verifyPodfile.sh)[https://github.com/Expensify/App/blob/main/.github/scripts/verifyPodfile.sh] to verify that Podfile.lock is in sync with Podfile (by getting the checksum for Podfile and ensuring it matches what is printed in Podfile.lock), but that does nothing to catch the case as outlined above.

Solution

Add some sort of automated check to prevent the merging of a PR that causes Podfile.lock to be modified but does not have the diff committed.

This could be a modification to the verifyPodfile script, an entirely new CI check, or anything else really that accomplishes the goal.

Requirements

  • Avoid solutions that would require workflow changes for developers, e.g. forcing everyone onto the same cocoapods version, or having to run bundle exec pod install instead of pod install. We have a large developer community which makes it challenging to communicate and enforce process changes like these.
  • It should be automated (e.g. not something vulnerable to human error, like simply adding another checkbox to our PR checklist)
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01baa80d227834e4fb
  • Upwork Job ID: 1600941999446802432
  • Last Price Increase: 2022-12-19

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:55 (27 by maintainers)

github_iconTop GitHub Comments

2reactions
JmillsExpensifycommented, Dec 23, 2022

Perfect! Offers sent via Upwork in the meantime. Happy holidays.

2reactions
roryabrahamcommented, Dec 23, 2022

@redstar504’s proposal looks good to me. There might be a few details to work through in the PR (especially to catch removed packages) but I’ve seen enough to feel comfortable with the direction we’re going with it 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Unexpected Podfile.lock Diffs After Pod Install
Double check any changes to Podfile.lock during code reviews to catch this before it is merged. Example. user$ pod repo list master -...
Read more >
Uncommitted changes: M Podfile.lock - Bitrise Discussions
Description of the issue running pod install locally and on Bitrise yields a different result Build log [10:37:01]: Git repository is dirty!
Read more >
What goes into your .gitignore if you're using CocoaPods?
Podfile, the lock file and the Pods directory all get committed. Trust me, it will save you a lot of hassle. What are...
Read more >
Podfile.lock - Romain Brunie - Medium
Podfile.lock is used to make sure that every members of the team has the same versions of pods installed on the project. This...
Read more >
Why does my team's Podfile.lock Podspec checksums change?
We use CocoaPods, and we don't check in our Pods directory for one of our fastest moving apps, Eigen. This sometimes can cause...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found