[FR]: Support running formatters in parallel #530
Replies: 5 comments
-
It's unusual to want to format all ~1000 files - perhaps you should call the formatter from a tool like pre-commit that knows which files have been changed? |
Beta Was this translation helpful? Give feedback.
-
Does Regarding sharding, I think using |
Beta Was this translation helpful? Give feedback.
-
format_test can't tell which files have changed. It would need some connection to version control, which is out of scope here. Also if you list the files to check, then it's hermetic and should be a cache hit, so vcs logic would make it non-hermetic (you could get a cache hit on a run that only checked a subset of files) |
Beta Was this translation helpful? Give feedback.
-
More thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Since opening this, I've migrated to using a dedicated CI step that uses |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the current behavior?
Files are passed via xargs to the formatter tool and run serially
Describe the feature
I have multiple C++ projects with large numbers of files (~1000) that take a very long time to format serially. We can use
xargs -P
to invoke multiple instances of the formatter. I'm not sure how the maximum number of processes should be determined.Beta Was this translation helpful? Give feedback.
All reactions