Skip to content

watchman integration for faster incremental runs #634

@9999years

Description

@9999years

Is your feature request related to a problem? Please describe.

Formatting is slow in large repos, even with caching enabled (4 seconds the first time, 0.5s on subsequent runs with no changes). It would be vastly faster if treefmt could narrow down which files had changed.

Describe the solution you'd like

I already have a watchman server running for tools like jj and buck2. treefmt could simply connect to that server and query it for a list of files which changed since the last time treefmt ran. Then, it could look at only those files to vastly cut down on the required work.

Additional context

Unlike #509, I am not proposing a new mode of operation in which treefmt continuously watches files and re-runs its formatters. Instead, I would like it to only query the watchman server once in order to ask it which files have changed since the last run.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions