[clang] [llvm] [clang-format] Add CI check confirming ClangFormatStyleOptions.rst is up-to-date. (PR #111513)
Aiden Grossman via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 22:50:26 PDT 2024
boomanaiden154 wrote:
> That's an excellent question, maybe @owenca will know! I should have asked in https://github.com/llvm/llvm-project/pull/96804#discussion_r1718407404; what I did instead was try to reason out an explanation based on what I could see, and I came up with two theories. The first one is that we want for ClangFormatStyleOptions.rst to be available to anyone browsing the repo... it's not very convincing, but it doesn't sound absurd. I could definitely get behind my second theory, though: we want to force everyone to review ClangFormatStyleOptions.rst before merging changes to the header files from which it is produced, and putting it in the repo is a good way to inject that into the code review process.
Based on the commit history (d278e0eee3f8c8f25131983979062b3d8e94ae77, https://reviews.llvm.org/D1597), it seems like the real answer might be that it just never got implemented. That looks like it was from the time where there were two build systems that both needed to be maintained at the same time, so maybe somewhat understandable it wasn't implemented that way. There is precedent for generating docs from other files (several clang docs pages are generated through tablegen. So I'd prefer to see a patch doing that rather than just asserting that it is the same. I don't think there should be issues with the Python requirement either. Most importantly, we already require a relatively recent Python in CMake, so its guaranteed to be available, and secondly building `clang-format` as part of a bootstrapping process doesn't make much sense.
That is my read on it, although I'm not a `clang-format` maintainer, so they might have more context there that I am not aware of.
> Anyhow, I'm proposing this because in https://github.com/llvm/llvm-project/pull/96804#discussion_r1718407404 I thought that it was an unreasonable burden for project maintainers having to manually gate on changes which may affect ClangFormatStyleOptions.rst, and also an unnecessary source of friction during code reviews, so I volunteered to automate that part.
Yeah, I saw the thread. Thanks for looking into process improvements here.
https://github.com/llvm/llvm-project/pull/111513
More information about the cfe-commits
mailing list