Skip to content

[pigeon] Pigeon generates analysis issues (unused local variable) #65872

Description

Bug

@gaaclarke Using pigeon v1.5.0 on the video_player plugin generates code that has analysis issues.

I needed to remove the following block of code manually:

flutter-team-archive/plugins@a068b6d

        final Map<dynamic, dynamic> mapMessage =
            message as Map<dynamic, dynamic>;

This is from the setup method of the generated test host.

Generation

The pigeons/messages.dart that generates this looks as follows:

@HostApi(dartHostTestHandler: 'TestHostVideoPlayerApi')
abstract class VideoPlayerApi {
  void initialize();
  TextureMessage create(CreateMessage msg);
  void dispose(TextureMessage msg);
  void setLooping(LoopingMessage msg);
  void setVolume(VolumeMessage msg);
  void setPlaybackSpeed(PlaybackSpeedMessage msg);
  void play(TextureMessage msg);
  PositionMessage position(TextureMessage msg);
  void seekTo(PositionMessage msg);
  void pause(TextureMessage msg);
  void setMixWithOthers(MixWithOthersMessage msg);
}

The setup method of the TestHostVideoPlayerApi contains the unused member.

Steps to reproduce

Luckily this ran on CI, which means that you can get the exact steps to reproduce from the CI steps:

https://cirrus-ci.com/task/5805102936096768

This contains all steps, completely reproducible (because it is CI and in flutter/plugins).
(https://github.com/flutter/plugins/runs/1118942372)

Activity

  1. xster commented on Sep 19, 2020

    @xster
    Member

    I assume this is fixed now @gaaclarke?

  2. gaaclarke commented on Sep 21, 2020

    @gaaclarke
    Member

    I assume this is fixed now @gaaclarke?

    yep, thanks

  3. github-actions commented on Aug 12, 2021

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

  4. locked as resolved and limited conversation to collaborators on Aug 12, 2021
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

    p: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions