<div dir="ltr"><div dir="ltr">On Wed, 14 Oct 2020 at 23:21, Sam McCall <<a href="mailto:sammccall@google.com">sammccall@google.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">AFAIK this is in principle expected, clang-format doesn't place a high prioriy on having stable formatting results across major versions.<br></div><div class="gmail_quote"><div>This is a tradeoff, requiring formatting to stay stable implies not fixing bugs.</div></div></div></blockquote><div><br></div><div>Agreed.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>In some workflows you can mitigate this by formatting/checking changed lines, which at least reduces the surface area.<br></div><div>But this is certainly a pain point if you want to enforce style with CI in a diverse environment.</div><div>At work, we enforce the same version of clang-format on all clients and CI.</div></div></div></blockquote><div><br></div><div>That's what we do, too. I think we'll just have to update the version of clang-format and require everyone to upgrade theirs, too.</div><div><br></div><div>I'll add a line to the "contributing" document about that.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>In a JS-based package I work on, we use the <a href="https://www.npmjs.com/package/clang-format" target="_blank">clang-format npm package</a> to pin the version.</div></div></div></blockquote><div><br></div><div>Arch Linux has a "clang-format-static-bin" which puts all statically compiled versions in /opt. But it would be good to have a solution that works on all platforms, including Windows.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>This looks like a bugfix to me. I think deduction guides were basically unsupported and broken in 9.<br></div></div></div></blockquote><div><br></div><div>Right, I do prefer the new formatting, but had to revert to using version 9 for the CI.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>clang-format-9:<br></div><div>      return {MeetType::get(ctx, readElements),<br>              JoinType::get(ctx, writeElements)};</div><div><br></div><div>clang-format-10:<br></div><div>      return {<br>        MeetType::get(ctx, readElements), JoinType::get(ctx, writeElements)};<br></div></div></blockquote><div>Less clear to me what's going on here, but I also suspect a bugfix.</div><div>The docs say "Fundamentally, C++11 braced lists are formatted exactly like function calls would be formatted in their place.".</div></div></div></blockquote><div><br></div><div>If that's true, then wouldn't the last curly brace + semicolon need to be in a new line, too?</div></div></div>