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

Report FirebaseCore version #851

Merged
merged 8 commits into from
Feb 27, 2018
Merged

Report FirebaseCore version #851

merged 8 commits into from
Feb 27, 2018

Conversation

bstpierr
Copy link
Contributor

Adds reporting of the FirebaseCore version as part of the useragent.

I've also added clearing of the library names for tests to avoid the
auto found versions on load.
* master:
  Auto-style swift sources (#847)
  Fixes clang warnings for Auth (#848)
  Add build infrastructure for Codable support in Firestore (#815)
@bstpierr bstpierr requested a review from ryanwilson February 26, 2018 19:46
@ryanwilson
Copy link
Member

@davidair I thought this was going to be for other libraries, not individual SDKs? Is this special because it's Core?

@paulb777
Copy link
Member

Run ./scripts/style.sh to fix travis

@bstpierr
Copy link
Contributor Author

Has the style script changed recently? It's telling me "Please upgrade to clang-format version 6.", but brew says I'm on the latest version.

@wilhuff
Copy link
Contributor

wilhuff commented Feb 26, 2018

You're on High Sierra, right? clang-format on high-sierra is now at 7.0.0

clang-format-2018-01-11.high_sierra.bottle.tar.gz ->
clang-format --version
clang-format version 7.0.0 (tags/google/stable/2018-01-11)

This is the same problem I had with swiftformat: High Sierra is now ahead of Sierra in homebrew because they're no longer updating Sierra.

@bstpierr
Copy link
Contributor Author

Yep, I'm on High Sierra.

I locally skipped the version check for now.

NSRange minor = NSMakeRange(1, 2);
NSRange patch = NSMakeRange(3, 2);
[FIRApp
registerLibrary:@"FirebaseCore"
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's change this to "fire-ios" to make it compact and generic (other examples could be fire-unity and fire-cpp)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

+ (void)registerLibrary:(nonnull NSString *)library withVersion:(nonnull NSString *)version
NS_SWIFT_NAME(registerLibrary(_:version:));
+ (void)registerLibrary:(nonnull NSString *)library
withVersion:(nonnull NSString *)version NS_SWIFT_NAME(registerLibrary(_:version
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, clang-format can't handle NS_SWIFT_NAME annotations with more than one colon in them. Even more unfortunately, clang can't handle them when they're split across lines like this. As of now this is a broken build. The fix is to format this function declaration by hand and surround it with clang-format off/on, as done here:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the tip! I was looking at this earlier and wonder what happened. I'll format it manually with the format comments.

@bstpierr bstpierr merged commit e55079e into master Feb 27, 2018
@bstpierr bstpierr deleted the bs-firebasecore-version branch February 27, 2018 01:03
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 7, 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.

6 participants