-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add more flexible swiftformat version check to scripts/style.sh. #2334
Conversation
scripts/style.sh
Outdated
@@ -61,7 +61,7 @@ if [[ "$system" == "Darwin" ]]; then | |||
version="${version/*version /}" | |||
# Allow an older swiftformat because travis isn't running High Sierra yet | |||
# and the formula hasn't been updated in a while on Sierra :-/. | |||
if [[ "$version" != "0.32.0" && "$version" != "0.33"* && "$version" != "0.35"* && "$version" != "0.37"* ]]; then | |||
if [[ "$version" != "0.32.0" && "$version" != "0.33"* && "$version" != "0.35"* && "$version" != "0.36"* && "$version" != "0.37"* && "$version" != "0.38"* && "$version" != "0.39"* && "$version" != "0.4"* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... what version does Travis have?
Initially there were just two versions because there was a lag between what we'd get on our desks and what was available to Travis. I think we slid down a (very) slippery slope when we started exempting more than the two.
What's the difference between this and no check at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My machine has 0.35.7. It seems that we're still not using enough Swift to trigger any differences from the versions.
I'm fine to stay flexible we're forced to get stricter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I said I'm not proud of this! I just knew it would solve my problem. 😛
How do we find out what version travis has?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a commit with the command swiftformat --version
and check the travis output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOUR SWIFT FORMAT VERSION IS: 0.35.7
Why are you shouting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any or all of these changes are fine with me as long as all of Firebase Swift is compatible with the version on Travis. cc: @ryanwilson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* master: (27 commits) Pass FSTMutations using a vector (#2357) Update CI to use CocoaPods 1.6.0 (#2360) Add NS_ASSUME_NONNULL_NOTATION for game center sign in (#2359) C++ migration: make all methods of `FSTRemoteStore` delegate to C++ (#2337) C++ migration: port write stream-related part of `FSTRemoteStore` (#2335) Resolve hard dependency of GameKit (#2355) Update gRPC certificate bundles locations for Firebase 5.16 (#2353) Start pod lib lint CI for IAM (#2347) Update library name to `fire-fiam`. (#2352) Bump FirebaseAnalyticsInterop version (#2315) Add IAM headless to CI (#2341) C++ migration: port watch stream-related part of `FSTRemoteStore` (#2331) Open source FIAM headless SDK (#2312) Port flaky test fix from web. (#2332) Make scripts/style.sh compatible with newer swiftformat versions (0.38) (#2334) C++ migration: port `FSTOnlineStateTracker` (#2325) Don't build fuzz tests target on Travis (#2330) Remove FSTMutationQueue (#2319) C++ migration: port `FSTRemoteEvent` (#2320) C++ migration: port `FSTTargetChange` (#2318) ...
I'm not really proud of this PR, but it allows my swiftformat 0.38 to work, and should be forward-looking enough to not need to be changed again next week. :-)