Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin tooling check for large files #116614

Open
stuartmorgan opened this issue Dec 6, 2022 · 1 comment
Open

Add plugin tooling check for large files #116614

stuartmorgan opened this issue Dec 6, 2022 · 1 comment
Labels
p: tooling Affects the flutter_plugin_tools package P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team Infra upgrades, team productivity, code health, technical debt. See also team: labels. team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team

Comments

@stuartmorgan
Copy link
Contributor

stuartmorgan commented Dec 6, 2022

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.
@stuartmorgan stuartmorgan added team Infra upgrades, team productivity, code health, technical debt. See also team: labels. plugin p: tooling Affects the flutter_plugin_tools package package flutter/packages repository. See also p: labels. P2 Important issues not at the top of the work list labels Dec 6, 2022
@stuartmorgan
Copy link
Contributor Author

I forgot about .pubignore; we can set up checks around that to strip out the entire example directory which will address some of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: tooling Affects the flutter_plugin_tools package P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team Infra upgrades, team productivity, code health, technical debt. See also team: labels. team-ecosystem Owned by Ecosystem team triaged-ecosystem Triaged by Ecosystem team
Projects
None yet
Development

No branches or pull requests

1 participant