Skip to content

☂️ Convert plugins to Pigeon #117844

@stuartmorgan-g

Description

@stuartmorgan-g

Pigeon improves the ease and safety of plugin development, and we've been having good experiences switching our plugins over to it as Pigeon has continued to mature and stabilize:

  • It eliminates bad-cast errors, where we make a mistake in the manual synchronization of expected types across the language boundary, including (in some languages) nullability mistakes in most cases.
    • It avoids the need to try to validate that contract in review, switching between the Dart and host code trying to see if all of the pieces line up as expected; instead the API definition can be easily reviewed, and then the implementations using that API can be reviewed in isolation, which is far easier.
  • It avoids the need to manage a bunch of string constants across languages.
  • It avoids a lot of tedious boilerplate for dictionary extraction to get individual arguments (and in ObjC, much of the need for annoying special-case handling of NSNull).

While it still has some limitations that we may want to address before adopting it in specific cases (e.g., we may want to implement an instance-tracking system before applying it to things like camera or maps, rather than having to build multiplexing in the API itself), in general we should plan to migrate all of our plugins to Pigeon.

This serves as a central tracking point, and explanation for the motivation for these migrations for future repo archeology. Plugin migrations are tracked in individual issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.packageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions