Skip to content

Add plugin tooling check for large files #116614

@stuartmorgan-g

Description

@stuartmorgan-g

Currently we don't have any checks on files being added to our packages. This has come up in a few different ways over time. Examples:

  • Occasionally adding a large file to a package, generally not needed for actual use (tests, docs, etc.) See [video_player] ios picture in picture plugins#6284 for instance.
  • We usually check in flutter create output for examples as-is, which means we have all the full-quality icons for every supported platform in each package's example.

While we don't need to be as strict about binary files as flutter/flutter (where developers are checking out the entire history, so suffer all the cumulative weight of every version of every file ever checked in), but people are downloading the whole current package via pub, so large files aren't ideal.

As a starting point we should:

  • Add tooling that flags either files over a certain threshold, or maybe any binary file not on an allow-list, and requires a override: label to pass checks so that a human has to evaluate it.
  • Add guidance to https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages about what to do in various cases.
    • For icons in particular, we could have a canonical set of icons (with high-res versions stripped out, or otherwise shrunk in some way since they don't need to be attractive) that live in a root directory in the project, and tell anyone adding examples to copy from those into the template.

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.p: toolingAffects the flutter_plugin_tools packagepackageflutter/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