Build error "Undefined symbols" when building with internal type in a package #2667
Replies: 2 comments 2 replies
-
Hi @gsl-anthonymerle, this is definitely a Swift compiler bug. You will notice that you do not get the error if you remove the public var body: some ReducerOf<Self> {
EmptyReducer()
} You can even keep the public var body: some ReducerOf<Self> {
Scope(state: \.self, action: \.self) {
EmptyReducer()
}
} Even that compiles. This is a bug with constrained opaque types (e.g. I don't think there's anything TCA can do to mitigate this. Probably the reason you could not reproduce it without TCA is because you didn't recreate the full machinery of the builders and opaque types, which is necessary to actually see the bug. If you were to do that then I'm sure you would see the same problem without having to import TCA. Since this is not an issue with the library I am going to convert it to a discussion. We also highly recommend you file this bug with Apple. |
Beta Was this translation helpful? Give feedback.
-
I had this too and I got to a point where it became impossible to maintain my project. Virtually every new TCA project broke my project + tests. |
Beta Was this translation helpful? Give feedback.
-
Description
Before anything, I want to say that I post the issue onthe TCA repository because I could not reproduce my case without using Reducers, but I do think this is more tied to some compiler bug than TCA 🙏
In a somewhat specific scenario, building an application fails with the following error:
Here is the setup to reproduce:
I've made a small project that reproduces the issue: https://github.com/gsl-anthonymerle/TCABuildError
Side notes:
Checklist
main
branch of this package.Expected behavior
I should not have a compilation error when build for release
Actual behavior
I have a compilation error when build for release
Steps to reproduce
Clone this project: https://github.com/gsl-anthonymerle/TCABuildError
Build for release
The Composable Architecture version information
1.5.3
Destination operating system
iOS 15
Xcode version information
Version 15.0.1 (15A507)
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions