<div dir="ltr"><div dir="ltr">On Tue, 10 Aug 2021 at 15:55, Manuel Klimek via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</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">I agree that that was probably not obvious or stated very clearly anywhere - clang-format for years was basically developed by a small team without much interest in input by the rest of the world, for a very specific use case.<br></div><div class="gmail_quote"><div>At the time we did not do a great job at spreading our thoughts with the world, as a lot of discussions were in person.</div></div></div></blockquote><div><br></div><div>I think there's more to that than what was created by the people who created it.</div><div><br></div><div>After being used extensively by people around the world, clang-format has perhaps grown to something that the original team did not envision.</div><div><br></div><div>However, as a public clang tool, and as part of the LLVM "family", it's no longer "a tool used by the team that created it", and not even "a tool used by LLVM developers". It is truly a public tool maintained by the LLVM community.</div><div><br></div><div>As such, I think we shouldn't restrict the design goals to the original design, or to what a small sub-group uses it for. Clang-format is an official tool like other visible stuff and should have the same community oversight as everything else.</div><div><br></div><div>There is a high demand for a formatting tool that can do so much more than the original design and people have been using it, albeit precariously, for that purpose already.</div><div><br></div><div>So I believe the original policy that "breaking changes are a benefit" can still be valid in a number of places, but it does not (and should not) need to be the only valid case. Definitely not the default, either.</div><div><br></div><div>I think we need to take a step back and ask users what they expect, rather than push forward a policy that people never really wanted but coped with it anyway because there's nothing better.</div><div><br></div><div>FWIW, borrowing suggestions from others in this thread, I propose we change the policy to:</div><div> * Breaking changes off by default, override behaviour with configuration files</div><div> * All behaviour must be controlled by a configuration flag with options explicit on doc/config</div><div> * Make explicit some options are breaking (comment/naming)</div><div> * Backwards compatibility is pursued, but can be broken in case of clear bugs</div><div><br></div><div>An easy way to manage the configuration in this case is to have a dump function (`clang-format --dump --config foo.cfg`) that reads a config file and dumps all missing parameters and their current values.</div><div><br></div><div>Inline comments would be nice but make configuration management hard, so there could be a webpage that describes all options and the URL is dumped on the config file.</div><div><br></div><div>cheers,</div><div>--renato</div></div></div>