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

[SSDK-736] fix SDK import through SPM #213

Merged
merged 6 commits into from
Apr 19, 2024
Merged

Conversation

aokj4ck
Copy link
Contributor

@aokj4ck aokj4ck commented Apr 17, 2024

Description

Fixes SSDK-736

I'm asking because @_implementationOnly is only compatible with resilient modules. You can build resilient modules using a classic Xcode project and by enabling the build setting Build Library for Distribution. I believe packages don't yet have a way to enable this feature without using unsafe flags.

Using @_implementationOnly without resilience may lead to runtime crashes and memory corruption. Very recent compilers warn about this configuration.

Considering @_implementationOnly is an unofficial feature you may still hit compiler crashes even in supported configurations. While there's not much we can do for crashes without resilience, if you still see a crash after enabling resilience I may be able to help on that front.

Checklist

  • Update CHANGELOG

@aokj4ck aokj4ck requested review from a team as code owners April 17, 2024 13:12

/// https://forums.swift.org/t/update-on-implementation-only-imports/26996
@_implementationOnly import MapboxCoreSearch
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes me think, @ _implementationOnly isn't the only experimental attribute we use, there is also @_exported: https://github.com/search?q=repo:mapbox/mapbox-search-ios%20_exported&type=code

Dropping it would be a breaking change because all developers will have to add additional imports, so I guess we can leave it for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that @_exported inside MapboxSearchController is very convenient to automatically import MapboxSearch. Stay tuned as the language evolves.

azarovalex
azarovalex previously approved these changes Apr 17, 2024
@aokj4ck aokj4ck enabled auto-merge (squash) April 18, 2024 21:18
@aokj4ck aokj4ck requested review from azarovalex and a team April 18, 2024 21:18
@aokj4ck aokj4ck disabled auto-merge April 18, 2024 22:15
@aokj4ck aokj4ck enabled auto-merge (squash) April 18, 2024 22:15
@aokj4ck aokj4ck merged commit fa0a370 into main Apr 19, 2024
5 checks passed
@aokj4ck aokj4ck deleted the SSDK-736-address-autofill-fixes branch April 19, 2024 14:07
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