This PR updates the macro code to allow it to generate case paths for cases which are conditionally compiled. For example:
@CasePathable enum Foo {
case bar
#if DEBUG
case debugCase
#endif
}
Currently released implementation would generate the case path only for bar.
Why
I'm working on a project where we use TCA. Because we share the code between iOS and macOS we have a few places where one platform has some additional actions (features) and they are wrapped with #if os.
What do you think? Would it be useful? Appreciate any feedback 🙂
Summary
This PR updates the macro code to allow it to generate case paths for cases which are conditionally compiled. For example:
Currently released implementation would generate the case path only for
bar
.Why
I'm working on a project where we use TCA. Because we share the code between iOS and macOS we have a few places where one platform has some additional actions (features) and they are wrapped with
#if os
.What do you think? Would it be useful? Appreciate any feedback 🙂