Skip to content

[pigeon] Analyzer warnings in generated ProxyApi code #183945

Closed

Description

@stuartmorgan-g

Several of our packages using proxy APIs have pub.dev score deductions for warnings in the generated code:

They fall into two buckets:

  • Generating a codec variable even if it's not used. Example:
    WARNING: The value of the field '_pigeonVar_codecSecTrust' isn't used.
    lib/src/common/web_kit.g.dart:9636:47
  • Unnecessary casts to Object? when exacting args. Example:
    WARNING: Unnecessary cast.
    lib/src/common/web_kit.g.dart:2581:37
    
         ╷
    2581 │           final Object? arg_body = (args[2] as Object?);

We try to keep Pigeon-generated code passing the analyzer, generally; we should see why our existing Pigeon tests didn't catch these. Probably we don't have test pigeon definition files that generate the necessary conditions?

/cc @bparrishMines

Activity

  1. added
    packageflutter/packages repository. See also p: labels.
    p: pigeonrelated to pigeon messaging codegen tool
    on Mar 20, 2026
  2. added
    P2Important issues not at the top of the work list
    on Mar 24, 2026
  3. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Jul 28, 2026
  4. flutter-triage-bot commented on Jul 28, 2026

    @flutter-triage-bot

    This issue is assigned to @bparrishMines but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  5. bparrishMines commented on Sep 1, 2026

    @bparrishMines
    Contributor
  6. github-actions commented on Sep 15, 2026

    @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.

  7. locked as resolved and limited conversation to collaborators on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

⏳Bot is counting down the days until it unassigns the issueP2Important issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolpackageflutter/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