Skip to content

[pigeon] Expose custom object IDs for testing on Linux #156100

Closed
flutter/packages
#9306

Description

@stuartmorgan-g

The way custom FlValue objects work on Linux, the ID they use is part of the API contract (to identify them, since there's no inherent runtime typing), but currently those assignments are an implementation detail of the generated Pigeon code. That's an issue for native unit tests, because in order to call fl_value_new_custom_object to make arguments to call handlers, the right ID is required.

This isn't high priority since it can be worked around by hard-coding the IDs in the tests, but that means that tests are subject to breakage when updating the Pigeon generation, which is obviously not ideal. We should make public constants for each of the Pigeon-generated class IDs, so that tests can be written using the constants, and get any updates automatically.

Activity

  1. added
    platform-linuxBuilding on or for Linux specifically
    packageflutter/packages repository. See also p: labels.
    p: pigeonrelated to pigeon messaging codegen tool
    on Oct 2, 2024
  2. changed the title [-][pigeon] Expose custom object IDs for testing[/-] [+][pigeon] Expose custom object IDs for testing on Linux[/+] on Oct 2, 2024
  3. added
    P2Important issues not at the top of the work list
    on Oct 8, 2024
  4. stuartmorgan-g commented on May 21, 2025

    @stuartmorgan-g
    ContributorAuthor

    This isn't high priority since it can be worked around by hard-coding the IDs in the tests

    It turns out this doesn't only affect tests; returning custom types in collections also requires being able to call fl_value_new_custom_object, because collections have to hold FlValue instances on Linux.

  5. 6 remaining items

  6. added a commit that references this issue on Jun 17, 2025
  7. added a commit that references this issue on Jun 17, 2025
  8. github-actions commented on Jul 1, 2025

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.platform-linuxBuilding on or for Linux specificallyteam-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