Skip to content

[quick_actions_ios] Xcode 16 beta 1: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable' #150448

Description

@jmagman

"extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'; this will not behave correctly if the owners of 'Flutter' introduce this conformance in the future"

- WARN  | xcodebuild:  packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift:17:1: warning: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'; this will not behave correctly if the owners of 'Flutter' introduce this conformance in the future

- NOTE  | [iOS] xcodebuild:  | |- warning: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'; this will not behave correctly if the owners of 'Flutter' introduce this conformance in the future
- NOTE  | [iOS] xcodebuild:  | `- note: add '@retroactive' to silence this warning

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8744774106861819249/+/u/Run_package_tests/validate_iOS_and_macOS_podspecs/stdout

https://github.com/flutter/packages/blob/937038cd033d2c468f871a338ec893343a09ca04/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift#L17

Swift Warning for Retroactive Conformances of External Types

Similar to #150391 though I'm not sure why it's a warning in this mode instead of an error.

Activity

  1. added
    platform-iosiOS applications specifically
    packageflutter/packages repository. See also p: labels.
    team-iosOwned by iOS platform team
    on Jun 18, 2024
  2. jmagman commented on Jun 18, 2024

    @jmagman
    MemberAuthor

    @tarrinneal do you know how this extension code is generated? I'm not spotting it in pigeon
    https://github.com/flutter/packages/blob/937038cd033d2c468f871a338ec893343a09ca04/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift#L17

    extension FlutterError: Error {}

    In Xcode 16.0 beta 1 it seems to want this to be "fully qualified" :

    extension FlutterError: Swift.Error {}

    The implication is that generated pigeon Swift files with this pattern will generate a compilation warning.

  3. changed the title [-]quick_actions_ios has error with Xcode 16 beta 1: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'; this will not behave correctly if the owners of 'Flutter' introduce this conformance in the future[/-] [+]quick_actions_ios has error with Xcode 16 beta 1: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'[/+] on Jun 18, 2024
  4. changed the title [-]quick_actions_ios has error with Xcode 16 beta 1: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'[/-] [+][quick_actions_ios] Xcode 16 beta 1: extension declares a conformance of imported type 'FlutterError' to imported protocols 'Error', 'Sendable'[/+] on Jun 18, 2024
  5. tarrinneal commented on Jun 18, 2024

    @tarrinneal
    Contributor
  6. added and removed
    team-iosOwned by iOS platform team
    on Jun 18, 2024
  7. LouiseHsu commented on Jun 18, 2024

    @LouiseHsu
    Contributor
  8. jmagman commented on Jun 20, 2024

    @jmagman
    MemberAuthor

    That line has changed, but the current version of it is here: https://github.com/flutter/packages/blob/937038cd033d2c468f871a338ec893343a09ca04/packages/pigeon/lib/swift_generator.dart#L842

    You're saying the extension code isn't generated any more by pigeon? Does that mean I should just regenerate the code for this particular plugin?

  9. stuartmorgan-g commented on Jun 20, 2024

    @stuartmorgan-g
    Contributor

    It was never generated by Pigeon, it was something we recommended people do at the plugin level in Swift plugins in older versions of Pigeon. I can fix this in the plugin.

  10. jmagman commented on Jun 20, 2024

    @jmagman
    MemberAuthor

    It was never generated by Pigeon, it was something we recommended people do at the plugin level in Swift plugins in older versions of Pigeon. I can fix this in the plugin.

    So this wasn't "Autogenerated from Pigeon (v12.0.1), do not edit directly."? It was edited?

  11. tarrinneal commented on Jun 20, 2024

    @tarrinneal
    Contributor

    That extension was added manually, but we've since switched to using our own PigeonError instead. I'm not sure if that class needs the new code (probably does)

  12. tarrinneal commented on Jun 20, 2024

    @tarrinneal
    Contributor

    you can see the old recommendations here packages/pigeon/example/README.md
    (this is the pr that added the new error class)

  13. jmagman commented on Jun 20, 2024

    @jmagman
    MemberAuthor

    I see, thanks for the clarification. I thought this code was autogenerated so required a pigeon update.

  14. stuartmorgan-g commented on Jun 20, 2024

    @stuartmorgan-g
    Contributor

    It should have been added in the code that used it rather than the generated file. We might have thought we were going to add it to the generator at that point?

    But it turns out we aren't even using FlutterError in that plugin, so I'm not sure why it ended up in the PR at all 🤷🏻

  15. jmagman commented on Jun 21, 2024

    @jmagman
    MemberAuthor

    Thank you @stuartmorgan and @tarrinneal!

  16. github-actions commented on Jul 5, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  17. locked as resolved and limited conversation to collaborators on Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

p: pigeonrelated to pigeon messaging codegen toolp: quick_actionsQuickActions pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-ecosystemOwned by Ecosystem team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions