Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Audit headers for nullability #1578

Merged
merged 1 commit into from
Jun 11, 2015
Merged

Audit headers for nullability #1578

merged 1 commit into from
Jun 11, 2015

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented May 17, 2015

All the headers have been audited for nullability. This is a breaking change in the sense that Swift code written against Mapbox GL will likely fail to compile. However, Xcode will offer fix-its for every error that comes up, and the resulting code will be much less stressful (less shouting!) and more idiomatic.

Fixes #1054.

/cc @incanus

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS refactor in progress and removed in progress labels May 17, 2015
@1ec5 1ec5 force-pushed the 1ec5-nullability-1054 branch from 629f8b3 to d376311 Compare May 26, 2015 18:00
@1ec5
Copy link
Contributor Author

1ec5 commented May 26, 2015

@incanus @bleege @friedbunny, just a heads-up that this PR brackets @interfaces in NS_ASSUME_NONNULL_BEGIN/NS_ASSUME_NONNULL_END. The NS_ASSUME_NONNULL_* macros keep the headers from getting incredibly messy. So once this PR is merged, if you add any public methods that receive or return a pointer type, remember to add the nullable annotation if the value may be nil for any reason.

This was referenced May 27, 2015
@incanus incanus added this to the iOS Beta 3 milestone Jun 8, 2015
@1ec5 1ec5 modified the milestones: iOS Beta 2, iOS Beta 3 Jun 10, 2015
@1ec5
Copy link
Contributor Author

1ec5 commented Jun 10, 2015

This needs to be on beta 2. Apple finally audited MapKit for nullability with Xcode 7 and the iOS 9 SDK, and we need to be compatible.

@1ec5 1ec5 added ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold and removed ready labels Jun 10, 2015
@1ec5
Copy link
Contributor Author

1ec5 commented Jun 10, 2015

Looks like I’ll need to also bring over much of 54e2bb8 to satisfy a warning about invoking a non-designated initializer in MGLUserLocationAnnotationView.

@incanus
Copy link
Contributor

incanus commented Jun 10, 2015

Apple finally audited MapKit for nullability with Xcode 7 and the iOS 9 SDK, and we need to be compatible.

Is this mostly from a "so it still looks like Apple" POV? Or something more drastic as to why we should hit this on the sooner side?

@1ec5
Copy link
Contributor Author

1ec5 commented Jun 10, 2015

Mostly from a “so it still looks like Apple” POV. But also so we can say we also audited Mapbox GL for nullability, just as Apple announced this week, and because this work has no stability implications.

@1ec5 1ec5 added ready and removed ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Jun 10, 2015
@jfirebaugh
Copy link
Contributor

@1ec5 If you are happy with this please rebase and merge it. 🚢

Added some nullability qualifiers in method implementation selectors for consistency with declarations.

The user dot view now has a non-zero size. Previously only its layer was sized properly. Also resolved some pedantic warnings about missing designated initializer overrides.

Xcode 6.3 or above is now required for building this project.
@1ec5 1ec5 force-pushed the 1ec5-nullability-1054 branch from 92a6ffd to f463286 Compare June 11, 2015 18:38
@1ec5 1ec5 merged commit f463286 into master Jun 11, 2015
@1ec5 1ec5 removed the ready label Jun 11, 2015
@1ec5 1ec5 deleted the 1ec5-nullability-1054 branch June 11, 2015 18:39
@1ec5 1ec5 mentioned this pull request Jun 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit headers for nullability (Swift support)
3 participants