From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4CC893854177 for ; Mon, 31 Oct 2022 14:15:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4CC893854177 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id E71711E11E; Mon, 31 Oct 2022 10:15:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1667225741; bh=Kf3wJvMNV6e3tQFdz+yaGv9sXDf3e0Oe+jFzM10U0I4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Kvrjx0u3snZWjOK4jjgRxAYBRqGAWNAtNi/O/4WYs6uhiTWR16ikMkCzIy9h7isUX pZiaHyCZ8HdL3ZYjEXbagz4x7c4R66nR89qly/x2Rd6sdNAiDU3rmt+vDhG2xHE2Us +keKoKh+yCIcTPYw5yPVny5BqEYHJNLqjKwo3Xco= Message-ID: Date: Mon, 31 Oct 2022 10:15:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: Any concrete plans after the GDB BoF? Content-Language: en-US To: Joel Brobecker , Simon Marchi via Gdb Cc: Mark Wielaard References: <83485199-965e-7ff5-1dc8-d027b74b56f7@arm.com> <5924814b-2e53-da09-6125-48ac5a5296e7@simark.ca> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/31/22 09:37, Joel Brobecker via Gdb wrote: >> I agree with all you said. There is always some resistance related to >> how clang-format handles this or that case. In my opinion, that's minor >> compared to the benefit of using it. My opinion would be: make the >> clang-format config that is closest to our style today, make a big >> re-format, and carry on. > > I agree with that. As long as the formatting is consistent, it might > take a little getting used to, but I think we'll be happier if we don't > have to spend time worrying about code formatting. > > The one small obstacle, perhaps, might be if different versions of > the tool format things differently. In that case, we might have to > clearly state which version we expect the code to be formatted with. > I am thinking of the kind of issues we get with the configury which > is generated by the auto tools, which is so dependent on the version > that even the distro-provided versions introduce spurious differences > sometimes, as a result of which I have built my own set of vanilla > autotools. If clang-format is tricky to build, we may have issues > in that respect... I would suggest mandating one version, and for that version to continuously be the latest stable version of clang-format, like we do for Black. When a new version comes out, we don't have to wonder if / when we move the next version. Someone just pushes a patch re-formating the code to the next version, if there are some differences. It keeps the overhead to a minimum. So far I have never seen problems related to distro-specific patches, as we have seen with autoconf. For Debian/Ubuntu, it's easy to get the latest stable version through apt.llvm.org. I don't really know about other distros. In any case, it's easy to build and not long (not long like building the whole llvm/clang): $ git clone --depth 1 https://github.com/llvm/llvm-project.git --branch release/15.x $ mkdir -p llvm-project/build $ cd llvm-project/build $ cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm -DCMAKE_INSTALL_PREFIX=/tmp/llvm $ make -j 4 clang-format $ make install-clang-format $ /tmp/llvm/bin/clang-format --version clang-format version 15.0.4 (https://github.com/llvm/llvm-project.git 08bd84e8a6358eb412fcef279f8875e2d69a3374) Simon