Skip to content

[pigeon] Test fails to build with Xcode 16 beta 1: error: extension declares a conformance of imported type 'DataWithEnum' to imported protocol 'Equatable' #150391

@jmagman

Description

@jmagman
packages/packages/pigeon/platform_tests/test_plugin/example/ios/RunnerTests/EnumTests.swift:15:1: error: extension declares a conformance of imported type 'DataWithEnum' to imported protocol 'Equatable'; this will not behave correctly if the owners of 'test_plugin' introduce this conformance in the future
 13 | }
 14 | 
 15 | extension DataWithEnum: Equatable {
    | |- error: extension declares a conformance of imported type 'DataWithEnum' to imported protocol 'Equatable'; this will not behave correctly if the owners of 'test_plugin' introduce this conformance in the future
    | `- note: add '@retroactive' to silence this warning
 16 |   public static func == (lhs: DataWithEnum, rhs: DataWithEnum) -> Bool {
 17 |     lhs.state == rhs.state

https://github.com/flutter/packages/blob/1e62ab016a36c248554f16b75f787e5cc1c46b27/packages/pigeon/platform_tests/test_plugin/example/ios/RunnerTests/EnumTests.swift#L15-L19

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8744850090572346513/+/u/Run_package_tests/custom_package_tests/stdout

Swift Warning for Retroactive Conformances of External Types

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.team-iosOwned by iOS platform team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions