Skip to content

When SwiftPM plugin sets Swift 6, build fails #182319

Description

@vashworth

If a plugin has set Swift 6 as the swift-tools-version or the swiftLanguageModes, it will fail with error:

Conformance of 'MyPlugin' to protocol 'FlutterPlugin' crosses into main actor-isolated code and can cause data races

Example:
https://github.com/spencerccf/app_settings/blob/111a15c4dca6fa9e094fca027ca27bdcd903c9e5/ios/app_settings/Package.swift#L1

Steps to repro:

  1. flutter create my_app && cd my_app
  2. flutter pub add app_settings
  3. flutter build ios

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.team-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions