Skip to content

Buildable and interoperable source pods #444

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

Merged
merged 47 commits into from
Nov 22, 2017
Merged

Buildable and interoperable source pods #444

merged 47 commits into from
Nov 22, 2017

Conversation

paulb777
Copy link
Member

With this PR, it is now possible to intermix source pods with released Firebase pods.

  • FirebaseCommunity is deprecated
  • There is now an exact one to one mapping between the open source and released pods
  • Turn off CocoaPods pch files for pod builds
  • CocoaPods 1.4.0 or newer is required
  • Externally depends on Firebase 4.6.0 being public, so travis and merge after that

Proposed plan is to run this in parallel with old release process for a few releases and then switch to releasing the pods as source pods from the git repo.

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

First pass

.travis.yml Outdated

branches:
only:
- master

- pb-future
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intended to bleed out?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

#import "FirebaseAuth.h"
#import "FirebaseCommunity/FIRLogger.h"
#import "FirebaseCore/FIRLogger.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Running scripts/style.sh should reorder these imports (unless Auth exempts itself).

Copy link
Member Author

Choose a reason for hiding this comment

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

Auth is exempt, but will run style.sh for rest

@@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

@import FirebaseCommunity;
@import Firebase;
//#import "FirebaseCore/FIRApp.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove commented-out code.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

#import "FirebaseCommunity/FIRLogger.h"

#import "FirebaseCore/FIRLogger.h"

Copy link
Contributor

Choose a reason for hiding this comment

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

Excess newline

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Example/Podfile Outdated
@@ -1,138 +1,136 @@
#remove next two lines after Firebase 4.6.0 release and before merge
Copy link
Contributor

Choose a reason for hiding this comment

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

These likely shouldn't be here

Copy link
Member Author

Choose a reason for hiding this comment

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

done

s.license = { :type => 'Apache', :file => 'LICENSE' }
s.authors = 'Google, Inc.'

s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => s.version.to_s }
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is too long. Try:

s.source           = {
  :git => 'https://github.com/firebase/firebase-ios-sdk.git',
  :tag => s.version.to_s
}

s.dependency 'leveldb-library', '~> 1.18'
s.dependency 'FirebaseCore', '~> 4.0'
s.ios.dependency 'FirebaseAnalytics', '~> 4.0'
s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Newline after the brace.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

s.requires_arc = base_dir + '*.m'
s.public_header_files = base_dir + 'Public/*.h'
s.library = 'sqlite3'
s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' =>
Copy link
Contributor

Choose a reason for hiding this comment

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

newline after the brace.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

s.library = 'c++'

s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' =>
s.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Next line can be pulled up one.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

s.ios.deployment_target = '7.0'

s.cocoapods_version = '>= 1.4.0.beta.2'
s.static_framework = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure this works for swift users?

Copy link
Member Author

Choose a reason for hiding this comment

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

Swift Firestore test builds and I tested Analytics and Auth quickstarts.

@@ -15,9 +15,7 @@
*/

#import <Foundation/Foundation.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

System imports/includes should be in a separate group

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Example/Podfile Outdated
target 'Core_Example_iOS' do
platform :ios, '8.0'

pod 'FirebaseCommunity/Core', :path => '../'
pod 'Firebase/Core', '4.6.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand "the forcing function for the Firebase pod". What are we forcing?

It seems like Example has a dependency on Firebase/Core, but that we're overriding the path of FirebaseCore, no?

s.source = { :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => s.version.to_s }
s.source = {
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
:tag => s.version.to_s
Copy link
Contributor

Choose a reason for hiding this comment

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

This :tag doesn't make any sense. The tags we're laying down are the Firebase release numbers (though we haven't been terribly good about that either). There is no 4.3.2 tag, and even if there were that would have been for an other Firebase-wide release number.

Shouldn't this tag be something like auth-4.3.2 if were to exist at all?

Otherwise it seems like we should be using the Firebase version for the tag.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now that the open source repo is interoperable with the released Firebase version, it needs to be specified which version of Firebase, since Firebase has exact version numbers for each of the subspec dependencies.

The specified version (4.6.0 here) needs to be updated the same time all of the respective versions in each podspec is updated to the component version that goes with 4.6.0.

In the interim period, while we're still doing the official release internally and only overriding from open source, the tags are no-ops. We can't push these podspec because we don't want to replace the official internally replaced version.

There is an ongoing discussion with product management about whether we want to keep versioning the components individually. If we do so, the tags will switch to something like "Auth-" + s.version.to_s and we'll add to the appropriate repo. This will happen once we're ready do the official release from open source.

@@ -16,7 +16,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
DESC

s.homepage = 'https://developers.google.com/'
s.license = { :type => 'Apache', :file => '../LICENSE' }
s.license = { :type => 'Apache', :file => 'LICENSE' }
s.authors = 'Google, Inc.'

s.source = { :git => 'https://github.com/TBD/Firestore.git', :tag => s.version.to_s }
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no 0.9.2 tag; this doesn't seem like it could pass pod lib lint.

Copy link
Member Author

Choose a reason for hiding this comment

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

pod lib lint is only a local check. The missing tag is an issue for pod spec lint though.

Separately, we won't be able to run pod spec lint until we can push the dependencies. The public FirebaseCore is not satisfactory, since the open source components depend on the open source Core for private header resolution.

pod lib lint only works for FirebaseCore because pod lib lint also requires dependencies to be publicly pushed. There are some possible approaches to address this, but depending on priorities, it might make sense to punt on linting until we're ready to do official releases from open source and in the meantime monitor warnings in the Xcode builds.

Copy link
Member

@ryanwilson ryanwilson left a comment

Choose a reason for hiding this comment

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

Awesome work @paulb777 👏 I'm at LGTM after @wilhuff's comments and the minor markdown fix.

specs:
cocoapods (1.3.1)
cocoapods (1.4.0.beta.2)
Copy link
Member

Choose a reason for hiding this comment

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

This is required, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this makes sure all our collaborators are using the same version of CocoaPods.

Copy link
Member Author

Choose a reason for hiding this comment

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

This sets the CocoaPods for the Travis runs.

It also can be used by repo developers if they prefix pod commands with bundle exec and have bundler installed via gem install bundler - (thanks to @morganchen12 for factoid!)

Copy link
Member

Choose a reason for hiding this comment

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

SGTM, thanks to you both for the explanation.

README.md Outdated
@@ -15,21 +15,38 @@ the Firebase iOS SDK. If you're interested in using the Firebase iOS SDK, start
## Context

This repo contains a fully functional development environment for FirebaseCore,
FirebaseAuth, FirebaseDatabase, FirebaseMessaging, and FirebaseStorage. By
FirebaseAuth, FirebaseDatabase, FirebaseFirestore, FirebaseMessaging, and
FirebaseStorage. By
Copy link
Member

Choose a reason for hiding this comment

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

Nit: spacing here? The next line should be brought up to this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks right when rendered at https://github.com/firebase/firebase-ios-sdk/blob/pb-future/README.md. I thought it might be better to keep more of the blame intact in the source.

Thanks for the review. I'm planning to present in Tuesday's leads meeting and hope to merge after that.

Copy link
Member

Choose a reason for hiding this comment

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

SGTM.

Copy link
Contributor

Choose a reason for hiding this comment

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

This file is also viewed in text editors; let's keep things looking crisp.

Copy link
Contributor

@morganchen12 morganchen12 left a comment

Choose a reason for hiding this comment

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

LGTM, but please wait for Gil approval.

Copy link
Member

@ryanwilson ryanwilson left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

README.md Outdated
@@ -15,21 +15,38 @@ the Firebase iOS SDK. If you're interested in using the Firebase iOS SDK, start
## Context

This repo contains a fully functional development environment for FirebaseCore,
FirebaseAuth, FirebaseDatabase, FirebaseMessaging, and FirebaseStorage. By
FirebaseAuth, FirebaseDatabase, FirebaseFirestore, FirebaseMessaging, and
FirebaseStorage. By
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is also viewed in text editors; let's keep things looking crisp.

@paulb777 paulb777 merged commit 3e59252 into master Nov 22, 2017
@paulb777 paulb777 deleted the pb-future branch March 5, 2018 23:02
minafarid pushed a commit to minafarid/firebase-ios-sdk that referenced this pull request Jun 6, 2018
@firebase firebase locked and limited conversation to collaborators Nov 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants