Skip to content

Conversation

@bharat
Copy link

@bharat bharat commented Mar 30, 2017

This PR resolves all swift 3.1 warnings.

@bharat bharat mentioned this pull request Mar 30, 2017
@ps2
Copy link
Collaborator

ps2 commented Mar 30, 2017

Could you add the .travis.yml changes as well?

Bharat Mediratta added 2 commits March 29, 2017 22:05
1. Change all explicit calls to .debugDescription over to
   String(describing:). This preserves existing behavior which was
   happening implicitly before swift 3.1

2. Use CGFloat.pi instead of CGFloat(Double.pi), and fix an issue where
   I accidentally negated one of the values in an earlier commit
updateGroup.enter()
deviceDataManager.doseStore.getGlucoseEffects(startDate: effectStartDate) { (effects, error) -> Void in
if let error = error {
deviceDataManager.doseStore.getGlucoseEffects(start: effectStartDate, end: .distantFuture) { result -> Void in
Copy link
Collaborator

Choose a reason for hiding this comment

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

The changes here, in StatusExtensionDataManager, PredictionTableViewController, and StatusTableViewController don't appear to be related to swift 3.1. Could you put those into a different PR along with a description of what they're addressing?

Copy link
Author

Choose a reason for hiding this comment

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

Swift 3.1 now throws warnings for using these deprecated APIs:

/Users/bharat/local/Loop/Loop/View Controllers/StatusTableViewController.swift:209:38: 'getRecentGlucoseValues(startDate:endDate:resultsHandler:)' is deprecated: Use getGlucoseValues(start:end:completionHandler:) instead

@bharat
Copy link
Author

bharat commented Mar 30, 2017

Since Swift 3.1 throws warnings for the deprecated APIs, I had rolled those up into this PR. But I can see the value in making those API changes separately so let me pull them out into a separate PR.

Separate them out from the non-API related warning fixes.
@bharat bharat changed the title Rebuild all frameworks for swift 3.1 and clean up all swift warnings Swift 3.1 - rebuild all frameworks, clean up all trivial swift warnings Mar 30, 2017
We were accidentally getting 1.2.1 because carthage considers it to be
compatible when you use the ~> notation.
@bharat bharat changed the title Swift 3.1 - rebuild all frameworks, clean up all trivial swift warnings Swift 3.1 - rebuild all frameworks, clean up all swift warnings Mar 31, 2017
@ps2 ps2 merged commit c60616e into LoopKit:dev Mar 31, 2017
@bharat bharat deleted the dev-3.1 branch April 1, 2017 07:20
ps2 added a commit that referenced this pull request Apr 7, 2017
* refactor of CGM device management

* Adding missing files from last cgm refactor pr

* Fail if any command in pipeline fails

* handling a memory warning and tweaks to the diagnostic report

* Fix tests that had been breaking for a while but were hidden by xcpretty swallowing exit code

* Show the glucose chart in the widget (#377)

Show the glucose chart in the widget. Thanks @bharat!

* Swift 3.1 - rebuild all frameworks, clean up all swift warnings (#421)

* Rebuild all frameworks with swift 3.1

* Resolve all Swift 3.1 warnings

* Swift 3.1 - update LoopKit to 1.2.1 (#423)

update LoopKit to 1.2.1

* Swift 3.1 - post widget merge cleanups (#424)

* Extend ChartColorPalette in Loop target to add a .default() palette

* Update chart appropriately when we remove glucose targets

* Drop the first predicted glucose entry. It's the current glucose and its interval to the second is not uniform with the interval for the rest

* Use predictedGlucose.startIndex for clarity instead of hardcoding indexes

* Swift 3.1 - update dexcom-share-client-swift and G4ShareSpy frameworks (#422)

update dexcom-share-client-swift and G4ShareSpy frameworks

* Project and margin cleanups (#427)

* support share-only cgm source (#426)

* fall back to getting cgm data from share if no others are configured

* use absence of g5 transmitter to indicate share-only setup.

* Widget should always display data using the preferred dispay unit, (#434)

regardless of the units used in the StatusExtensionContext.

* Break the tie between two visual constraints. (#439)

"<NSLayoutConstraint:0x600000097430 LoopUI.ChartContentView:0x7f808c50aae0.height >= 100   (active)>",
"<NSLayoutConstraint:0x60000009c2f0 'UISV-hiding' LoopUI.ChartContentView:0x7f808c50aae0.height == 0   (active)>"

Lower the priority of the height >= 100 constraint.

* bump version (#441)
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