Skip to content

Linking error in Release mode #1556

Answered by tgrapperon
rcarver asked this question in Q&A
Oct 24, 2022 · 3 comments · 13 replies
Discussion options

You must be logged in to vote

Hey @rcarver. This is a bug I've noticed a few months ago. Swift optimizer sometimes prunes non-public nested types that are only referenced in @ResultBuilders functions, like ReducerProtocol and SwiftUI's bodys.

I didn't manage to reproduce it in a standalone project, and I forgot to report it.

It can bite you really easily with internal or private enums that you're using as identifiers. That's why I'm now declaring them as public and relocate them in the reducer itself, beside State and Action.

We should definitely find a repro and report it properly, as the issue will occur more and more given the way we organize features nowadays.

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
12 replies
@tgrapperon
Comment options

@rzulkoski
Comment options

@tgrapperon
Comment options

@rzulkoski
Comment options

@tgrapperon
Comment options

Answer selected by rcarver
Comment options

You must be logged in to vote
1 reply
@tgrapperon
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
apple bug Something isn't working due to a bug on Apple's platforms.
8 participants