Skip to content

Consider a "fast" dev/bots/analyze.dart that runs in ~seconds #170491

Open
@matanlurey

Description

@matanlurey

The checks behind dev/bots/analyze.dart have expanded over time, now nearly 3K lines, and all run in serial, and on every file in the tree, often multiple times. That is, different serial steps each load every file from the filesystem, and analyze each line for string matches.

An alternative architecture could make this significantly faster:

  • Local1 runs only: Only check changed files.
  • Make only ~one call to find "every file in tree" (locally: every changed file in tree)
  • Have checks that do line-by-line reads re-use an opened file (instead of each reading)
  • Shard and run checks in parallel (either by using a worker-process model or isolates)
  • Label some checks as optional, they only run on CI or if triggered manually (with a flag)

By doing all of the above, it's possible we could have a fast commit hook to catch many small issues.

Footnotes

  1. The idea behind even if there is a false positive, it will still be caught on CI.

Metadata

Metadata

Assignees

Labels

c: proposalA detailed proposal for a change to Flutterteam-infraOwned by Infrastructure team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions