Skip to content

deps: Sync ios/Podfile.lock with recent dependency upgrades #92

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

Closed
wants to merge 1 commit into from

Conversation

chrisbobbe
Copy link
Collaborator

These changes get made automatically for me when I build/run the iOS app, which I believe is when pod install gets run.

It looks like a symptom of pod install not being done in 861a929 (in the case of path_provider_foundation) and in 99dd6a7 (in the cases of device_info_plus and share_plus).

These changes get made automatically for me when I build/run the iOS
app, which I believe is when `pod install` gets run.

It looks like a symptom of `pod install` not being done in 861a929
(in the case of `path_provider_foundation`) and in 99dd6a7 (in the
cases of `device_info_plus` and `share_plus`).
@chrisbobbe chrisbobbe requested a review from gnprice May 16, 2023 21:48
@gnprice
Copy link
Member

gnprice commented May 17, 2023

Huh, weird.

It's not as simple as this:

It looks like a symptom of pod install not being done in 861a929 (in the case of path_provider_foundation) and in 99dd6a7 (in the cases of device_info_plus and share_plus).

because when I run pod install now (or flutter run for an iOS device), it doesn't make any changes.

I wonder if this is CocoaPods's broken caching showing up again — perhaps I have an old version of some of these lying around in my cache, and you downloaded them fresh and got a newer version. (Or in some way vice versa?)

@gnprice
Copy link
Member

gnprice commented May 17, 2023

because when I run pod install now (or flutter run for an iOS device), it doesn't make any changes.

And indeed when I check out this PR branch on my Mac and run pod install, it changes these lines back.

@gnprice
Copy link
Member

gnprice commented May 17, 2023

@gnprice
Copy link
Member

gnprice commented Jun 2, 2023

OK, I think we've cleared that up. Sorry for the delayed debugging.

The resolution is that pod install is not enough — rather one needs to run flutter run for an iOS device (or presumably flutter build would work too). That will indeed run pod install; but before it does so, it updates a set of symlinks like ios/.symlinks/plugins/share_plus, each of which points to the appropriate package tree in the pub cache. That ensures those point to the current version of those packages specified in our pubspec.lock, and then pod install in turn refers to those to generate the podspec JSON files, and those lines which are hashes of those files.

So in the end it's pretty simple: the discrepancy was a symptom of flutter run not being run on those changes. When making dependency updates that may include plugin changes, we should remember to run flutter run (or flutter build) on at least iOS and macOS, where there is this extra file that needs to have dependency updates propagated through to it.

@gnprice
Copy link
Member

gnprice commented Jun 2, 2023

It looks like there's a merge conflict, and there's also now the related #143.

Would you rebase this, and combine it with #143 and any other commits to produce a branch that updates all these generated files as needed? Then hopefully I can reproduce the same result on my machine, and all will be clear.

chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request Jun 2, 2023
These changes happen in my environment when I run `pod install`,
which I've just done for this commit.

Greg's and my Podfile.lock were disagreeing about these checksums.
Discussion and diagnosis:
  zulip#92 (comment)
@chrisbobbe
Copy link
Collaborator Author

Sure: #148

gnprice pushed a commit to chrisbobbe/zulip-flutter that referenced this pull request Jun 2, 2023
These changes happen in my environment when I run `pod install`,
which I've just done for this commit.

Greg's and my Podfile.lock were disagreeing about these checksums.
It turns out they agree once one runs `flutter run` (for an iOS device),
rather than just `pod install`.  Discussion and diagnosis:
  zulip#92 (comment)

[greg: added mention of `flutter run`]
@chrisbobbe
Copy link
Collaborator Author

Closing, as #148 was merged, superseding this.

@chrisbobbe chrisbobbe closed this Jun 2, 2023
@chrisbobbe chrisbobbe deleted the pr-podfile-lock-updates branch June 2, 2023 17:47
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