refactor: use format_multirun on CI#5227
Conversation
anonrig
left a comment
There was a problem hiding this comment.
can you make sure .zed settings are correct?
|
I don't know how to tell what settings are correct, if CI is green that's all I can go on. How many editors are officially supported here? |
zed settings json contains formatter code for every language since we don't want to run bazel run format on a single file. can you make sure the bazel run commands are updated as well? we support vscode and zed. |
This provides a shorter and more standard way to invoke formatters for all languages. rules_lint is widely adopted and has many companies contributing. Subset of #5227 to rollout in smaller steps
|
#5235 picks out the first part of this that can land independently |
This provides a shorter and more standard way to invoke formatters for all languages. rules_lint is widely adopted and has many companies contributing. Subset of #5227 to rollout in smaller steps code review feedback add prettier
This provides a shorter and more standard way to invoke formatters for all languages. rules_lint is widely adopted and has many companies contributing. Subset of #5227 to rollout in smaller steps code review feedback add prettier
This provides a shorter and more standard way to invoke formatters for all languages. rules_lint is widely adopted and has many companies contributing. Subset of #5227 to rollout in smaller steps code review feedback add prettier
This provides a shorter and more standard way to invoke formatters for all languages. rules_lint is widely adopted and has many companies contributing. Subset of #5227 to rollout in smaller steps code review feedback add prettier
c969d5d to
7abe0b1
Compare
a467ddf to
f8fc3f8
Compare
|
The generated output of |
f1f1a10 to
09992a8
Compare
CodSpeed Performance ReportMerging #5227 will improve performances by 12.34%Comparing Summary
Benchmarks breakdown
Footnotes
|
|
I'm pretty swamped atm, but will try to get to this PR later this week. It seems pretty big though – maybe we can factor out the changes that result in significantly expand reformatting to another PR so that the reviewers can focus on the more interesting changes of moving formatting to bazel? |
|
Changes mostly LGTM. |
https://registry.bazel.build/docs/aspect_rules_lint/1.10.2#rule-languages
I dunno why you weren't formatting those files before, I suspect it's not a good use of my consulting hours to study the legacy formatting script. I can exclude them from this PR if you prefer. |
|
Yeah, I'd personally make sure that this change isn't modifying any formatting, just keeping the existing behaviour. We can fix any inconsistencies in what's included in a follow-up PR. Another question: Can we create a target that lets us format just one language at a time? e.g. if I want to format only C++ files? |
|
@npaun okay - looks like the reason so many files in the repo aren't formatted is you only applied https://github.com/cloudflare/workerd/pull/3054/files to the Alternatively I can figure a way for Bazel to also ignore clang-format and prettier outside the |
|
I think we can just format the whole repository. I don't think there is a particular reason why we didn't do the whole repo... |
|
I added a |
|
|
I believe we get this for free – there are targets like |
Remove custom install of buildifier, which comes more easily from BCR
seems like a bug in format.py that it didn't include them
bd1a9fb to
075ba8e
Compare
|
Added @fhanau I intentionally changed only the GHA flow in this PR, my hope is to vet it before we change If you want though I can add that to this PR. |
Remove custom install of buildifier, which comes more easily from BCR
|
I'm not Felix, but I'd do the justfile and githooks now in this PR. |
This provides a shorter and more standard way to invoke formatters for all languages. rules_lint is widely adopted and has many companies contributing. Subset of #5227 to rollout in smaller steps code review feedback add prettier
Change the CI script
lint.ymlto runbazel run format.It is more correct, finding files that apparently were missed by the format.py setup.
@anonrig yes the .zed and .vscode settings are unchanged, the labels we refer to are the same (still runs
/path/to/workerd/bazel-bin/build/deps/formatters/clang-format --helpfor example)After this lands, next steps will be: