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

[CocoaPods] Resolve dependencies at parent level #1210

Merged
merged 2 commits into from
Apr 2, 2018

Conversation

iwasrobbed-ks
Copy link
Contributor

Issue

Subspecs should not be used as a means to add/remove 3rd party code that CodePush depends upon. It's meant only to add/remove features within a given library itself.

When other projects also rely upon those 3rd party libraries, subspecs break things because they don't allow you to do version resolving and dependency management like CocoaPods does by default.

Changes

Instead of using subspecs that reference some local files in the repo, we let CocoaPods resolve dependencies based upon versions. Otherwise, you end up with very opaque linking errors trying to add/remove subspecs.

I would recommend using the same approach of using dependency resolving for all other installation methods like Carthage and leave manual installation as an "at your own risk" like it's meant to be.

Update Instructions

Updaters will just need to:

  • Update any of their Podfile's to remove references to the subspecs
  • Run $ bundle exec pod update CodePush

This is necessary versus using subspecs since CocoaPods needs to be able to resolve the dependencies properly at the parent workspace level based on needed versions. Otherwise, you end up with very opaque linking errors.
@msftclas
Copy link

msftclas commented Feb 20, 2018

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@itoys itoys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Great job! Thanks for contributing.

@itoys itoys merged commit 58be2bc into microsoft:master Apr 2, 2018
@mistikk
Copy link

mistikk commented May 27, 2019

This pr broke these issues again;
#1378
#1236
#1123
#1114
#241

Yes subspecs should not be used as a means to add/remove 3rd party code, but we should produce a new method instead of that.
@rob-keepsafe

mistikk added a commit to ecency/react-native-code-push that referenced this pull request May 27, 2019
mistikk added a commit to ecency/react-native-code-push that referenced this pull request May 27, 2019
Revert "[CocoaPods] Resolve dependencies at parent level (microsoft#1210)"
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.

4 participants