Skip to content

Conformance of 'Feature.Path.State' to protocol 'CaseReducerState' crosses into main actor-isolated code and can cause data races #3768

@ddanilyuk

Description

@ddanilyuk

Description

While creating a new project with TCA using Xcode 26 beta 7, Swift 6 mode, and SWIFT_DEFAULT_ACTOR_ISOLATION=MainActor.
I encounter a compiler error when applying the @Reducer macro to an enum.

Image

I’m not sure whether this is a TCA issue or a compiler/Xcode, but the macro appears to fail in this configuration.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

No response

Actual behavior

No response

Reproducing project

@Reducer
struct Feature {
    @ObservableState
    struct State: Equatable { }
}

@Reducer
enum Path {
    case child(Feature)
}

extension Path.State: Equatable { }

The Composable Architecture version information

1.22.2

Destination operating system

iOS 26

Xcode version information

Xcode 26 beta 7

Swift Compiler version information

swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
Target: arm64-apple-macosx26.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working due to a bug in the library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions