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

Use @_spi(Experimental) for experimental methods #680

Merged
merged 3 commits into from
Sep 15, 2021
Merged

Use @_spi(Experimental) for experimental methods #680

merged 3 commits into from
Sep 15, 2021

Conversation

jmkiley
Copy link
Contributor

@jmkiley jmkiley commented Sep 15, 2021

PRs must be submitted under the terms of our Contributor License Agreement CLA.

Fixes: < Link to related issues that will be fixed by this pull request, if they exist >

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Document any changes to public APIs.
  • Apply changelog label ('breaking change', 'bug 🪲', 'build', 'docs', 'feature 🍏', 'performance ⚡', 'testing 💯') or use the label 'skip changelog'

Summary of changes

This PR:

  • Uses the @_spi(Experimental) annotation to mark style methods as experimental. This means that in order to use these methods, you will need to annotate your import statement for MapboxMaps with @_spi(Experimental). (@_spi(Experimental) import MapboxMaps).
  • Removes the underscore prefix that previously marked these methods as experimental.

User impact (optional)

@jmkiley jmkiley added the breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published label Sep 15, 2021
@jmkiley jmkiley self-assigned this Sep 15, 2021
Comment on lines +173 to +176
- Note: This method is marked as experimental. Annotate the import statement
for `MapboxMaps` with `@_spi(Experimental)` in order to use experimental methods.
*/
public func _source(withId id: String, type: Source.Type) throws -> Source {
@_spi(Experimental) public func source(withId id: String, type: Source.Type) throws -> Source {
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 think this needs to be experimental anymore. (same for the corresponding layer method above). We could actually knock out another issue related to these APIs at the same time by removing the variants that don't take a type parameter.

Copy link
Contributor

Choose a reason for hiding this comment

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

That said, let's defer this feedback to our audit of all experimental APIs.

@jmkiley jmkiley merged commit 84269d5 into main Sep 15, 2021
@jmkiley jmkiley deleted the jk/spi branch September 15, 2021 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants