[clang] [clang-format] Stop breaking unbreakable strings in JS (PR #66168)

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 17:09:33 PDT 2023


alexfh wrote:

> > Another thing is that we need to get this fixed really soon. Another (safer and actually preferred) alternative is to revert the change and address problematic use cases before recommitting it, but I'm also fine with forward-fixing this as long as fixes don't require major changes that have potential for other problems to appear.
> 
> I see. In that case, I added #66372.

I think, disabling the functionality for JS/TS is the right choice until all wrinkles are ironed.

> However, why do you need it fixed so soon? The latest release is version 16. And the string breaking stuff isn't even in the version 17 branch.

In general, "as a community, we strongly value having the tip of tree in a good state while allowing rapid iterative development" (as opposed to allowing to break stuff after a release cut and trying to glue the pieces together before the next release, see https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy). Some LLVM users (toolchain teams at Google, for example) strongly rely on the ToT LLVM being close to (that is, at most a few patches away from) production quality. We are updating our toolchain ~weekly and expect all tools (including clang-format) to be free from critical defects (if you're interested, there's a talk about this: https://www.youtube.com/watch?v=zh91if43QLM). Other users (including multiple open-source projects) may take various parts of LLVM at arbitrary moments of time with similar expectations to the code quality. This particular problem happens to be critical, since it makes clang-format generate invalid code. Leaving this state for weeks after it was detected (or requiring users to modify their configuration just to work around the problem) is unacceptable, thus I think we should proceed with #66372 (or a revert of the original patch) for now.

https://github.com/llvm/llvm-project/pull/66168


More information about the cfe-commits mailing list