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

2023-11-05 Thread via cfe-commits
sstwcw wrote: > Here are string literal context from closure - This still misses contexts > when string literal is required, for example > https://github.com/search?q=repo%3Agoogle%2Fclosure-compiler%20%22%20must%20be%20a%20string%20literal%22&type=code > > I wonder, if splitting the literal w

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

2023-09-20 Thread via cfe-commits
eaeltsin wrote: Looks like we need the similar fix for verilog, see https://reviews.llvm.org/D154093#4648931 https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

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

2023-09-14 Thread via cfe-commits
eaeltsin wrote: I second @alexfh that we need to submit #66372 to get back to the good state. Please proceed ASAP. https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

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

2023-09-14 Thread via cfe-commits
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 requ

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

2023-09-14 Thread via cfe-commits
sstwcw wrote: > I wonder, if splitting the literal with + is a good option at all. Maybe that means we should make the `BreakStringLiterals` option default to off for JavaScript. But I want about 2 weeks to decide. Can you set the option in your configuration as a workaround for now? If so,

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

2023-09-14 Thread via cfe-commits
eaeltsin wrote: Here are string literal context from closure - This still misses contexts when string literal is required, for example https://github.com/search?q=repo%3Agoogle%2Fclosure-compiler%20%22%20must%20be%20a%20string%20literal%22&type=code I wonder, if splitting the literal with `+`

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

2023-09-14 Thread via cfe-commits
sstwcw 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 majo

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

2023-09-14 Thread via cfe-commits
alexfh wrote: > Here is the new fix. #66321 Thanks! I think, I found another pattern where string literal breaking is not allowed - in parameters of `goog.module.get()` (https://google.github.io/closure-library/api/goog.module.html). I'm not completely sure, which tool produces the error I'm

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

2023-09-13 Thread via cfe-commits
alexfh wrote: Unfortunately, this is not enough. I found at least one more broken case (pun intended): ``` export type LooongTypeName = ''|('BB'); ``` gets transformed into ``` export type LooongTypeName = ''|('B' +

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

2023-09-13 Thread via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-09-13 Thread via cfe-commits
https://github.com/alexfh approved this pull request. LG. Thanks for the prompt fix! https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-09-12 Thread via cfe-commits
sstwcw wrote: Who should I add for JS-related stuff? @mprobst seems to have stopped working on this project. @frigus02 can you have a look at this? https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

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

2023-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Changes Dictionary literal keys and strings in TypeScript type declarations can not be broken. The problem was pointed out by @alexfh and @e-kud here: https://reviews.llvm.org/D154093#4644512 -- Full diff: https://github.com/llv

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

2023-09-12 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-09-12 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-09-12 Thread via cfe-commits
https://github.com/sstwcw created https://github.com/llvm/llvm-project/pull/66168: Dictionary literal keys and strings in TypeScript type declarations can not be broken. The problem was pointed out by @alexfh and @e-kud here: https://reviews.llvm.org/D154093#4644512 >From 201f6b1b34a3b4317eb

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

2023-09-12 Thread via cfe-commits
https://github.com/sstwcw review_requested https://github.com/llvm/llvm-project/pull/66168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits