From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id D+kzEqzYX2OwiBIAWB0awg (envelope-from ) for ; Mon, 31 Oct 2022 10:16:12 -0400 Received: by simark.ca (Postfix, from userid 112) id 312811E124; Mon, 31 Oct 2022 10:16:12 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=wCWiu2Zd; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A91441E11E for ; Mon, 31 Oct 2022 10:16:11 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F3E63385380F for ; Mon, 31 Oct 2022 14:16:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3E63385380F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667225771; bh=uxu58zKCSmGmgkQ9sclIT785UFBxdUOsNKSuTK0ZoaI=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wCWiu2ZdRKZ/z9IDK9TORIJZec43btmACGu6Q4jWbsB23AYN9aTDqZ2K3koVcvmcW dugANaBDq2/bY/LDAk+RtSoRwQyhaS9ggshBHkQpzj/IaCzO057uvlUTNON48XrvfY iU8qHfmUzMKeQwxmGOSnNx59s35iSm4Q31Z9F9Mk= 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 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) 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 References: <83485199-965e-7ff5-1dc8-d027b74b56f7@arm.com> <5924814b-2e53-da09-6125-48ac5a5296e7@simark.ca> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Cc: Mark Wielaard Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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