<div dir="ltr"><div>It seems the pre-merge has <a href="https://lists.llvm.org/pipermail/llvm-dev/2021-May/150614.html">just moved to</a> LLVM 12. <br></div><div><br></div><div>I think it is actually sensible to use the latest released version (so in this case 12, as 13 is not out yet), otherwise whenever you rebase a patch that's in review you also need to rebuild clang-format locally (instead of just flang + tests). In addition, there's no connection in Phabricator between a patch and the commit it is based on, so it's not clear what the in-tree version is. If you mean ToT, then that can change while a patch is in review. Think about what it would mean for a flang patch if a clang-format patch is committed, then reverted for bug-fixes, then committed again, all while the flang patch is still in review. Does that mean the pre-merge checks should be run 3 times, potentially with different results each time? That would be both confusing and very resource intensive. On the other hand, if the pre-merge checks are only run once, when you first upload the patch, then you'd essentially have non-deterministic formatting, depending on what happened to be in tree at that exact moment. Using the release binaries gives much more stability.</div><div><br></div><div>There may be some delay between when the release binaries become available and when the pre-merge bots are updated, but that's probably something that can be mitigated. In this case, the delay was a whole month, which is admittedly quite long, especially since the release cycles are only a couple of months long if you count minor releases too. But with the release process moving towards becoming more and more automated, I suspect this step could be automated too, and then there would be no delay at all. You could still end up in a situation where you submitted a patch just before the release went public, and then you'd have to update your formatting to match the new release, but that should only happen infrequently. </div><div><br></div><div>Just my 2 cents, I hope I didn't misinterpret what you were saying.</div><div><br></div><div>Cheers,</div><div>Diana</div><br>On Fri, 14 May 2021 at 23:32, Michael Kruse via flang-dev <<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a>> wrote:<br>><br>> I think the only canonical version is the version in-tree at the same<br>> revision. Everything else would require another discussion and/or<br>> manual work with the bots after clang has had a new release.<br>><br>> Maybe the pre-merge bot could be changed to also keep clang-format and<br>> clang-tidy up-to-date?<div>><br>> Michael<br>><br>><br>> Am Fr., 14. Mai 2021 um 08:35 Uhr schrieb Peter Steinfeld via<br>> flang-dev <<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a>>:<br>> ><br>> > Over the past several months, I’ve always used the latest version of clang-format built from the latest version of LLVM.  Currently, this is version 13.0.0.  When recently reviewing Phabricator requests, I’ve noticed differences caused by changes in clang-format.  So I decided to clean up all of the differences and filed <a href="https://reviews.llvm.org/D102424">https://reviews.llvm.org/D102424</a>.  But when Phabricator displayed my request, it annotated it with several comments saying that clang-format needed to be run on some of the files.  Apparently Phabricator is using a different version of clang-format, so I filed <a href="https://github.com/google/llvm-premerge-checks/issues/303">https://github.com/google/llvm-premerge-checks/issues/303</a> for this issue.<br>> ><br>> ><br>> ><br>> > What’s the proper process?  Which version of clang-format should we all be using?<br>> ><br>> ><br>> ><br>> > Pete<br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > flang-dev mailing list<br>> > <a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a><br>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a><br>> _______________________________________________<br>> flang-dev mailing list<br>> <a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a><br>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a></div></div>