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

@_implementationOnly import UIKitNavigationShim #225

Merged
merged 7 commits into from
Sep 6, 2024

Conversation

TobiasRe
Copy link
Contributor

@TobiasRe TobiasRe commented Sep 6, 2024

Background

When consuming this library there are some rare cases where Xcode fails to build a project with missing required module 'UIKitNavigationShim' errors.
This can occur in frameworks and libraries that don't link swift-navigation or swift-composable-architecture itself.
Since UIKitNavigationShim is only used as an internal target when can safely import it as @_implementationOnly to resolve this issue.

Changes

  • imports UIKitNavigationShim as @_implementationOnly

Fixes pointfreeco/swift-composable-architecture#3352

This resolves some `missing required module 'UIKitNavigationShim'` errors when consuming this library
Copy link
Member

@mbrandonw mbrandonw left a comment

Choose a reason for hiding this comment

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

Wow, great find @TobiasRe! I have confirmed this works too, and so I have also added a new CI test that builds a dynamic framework to make sure we don't break this in the future. Thanks!

@mbrandonw mbrandonw merged commit d1bdbd8 into pointfreeco:main Sep 6, 2024
8 checks passed
@stephencelis
Copy link
Member

@TobiasRe Digging into this further we realized that @_implementationOnly is technically deprecated for scoped imports. So I've opened this PR: #226

Can you check that branch to see if it still works for you? Or perhaps it needs to be an internal import or package import?

@TobiasRe
Copy link
Contributor Author

@stephencelis Thanks for reaching out.
I wondered about this too. Unfortunately neither internal import nor package import nor private import resolve this issue in our specific case and seemingly for dynamic frameworks in general.

So I guess we will have to stick to @_implementationOnly for now.

@TobiasRe
Copy link
Contributor Author

@stephencelis Do you mind creating a patch release to include this change?

@mbrandonw
Copy link
Member

@TobiasRe Oops, we lost track of that. Just released 2.2.1!

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.

Missing required module 'UIKitNavigationShim'
3 participants