From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id XBrbHqBeimdbVBIAWB0awg (envelope-from ) for ; Fri, 17 Jan 2025 08:44:00 -0500 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=K3GhJE4/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 666A31E100; Fri, 17 Jan 2025 08:44:00 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.0 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DBB411E08E for ; Fri, 17 Jan 2025 08:43:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45F62384782A for ; Fri, 17 Jan 2025 13:43:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45F62384782A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1737121439; bh=hU9/6F/tas4F8vk710ossm7lYL0KDQng2p7Fp/xHrKs=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=K3GhJE4/k5VW8A14xOnPbzd9kfwbBLrTMK9LSoFj4/AD0F6wMYx3U2VeNwXqHwUfl Du1gPipWuCvH1k6Z7qE6Pn9FQODvC1tWtMrELXIEs9yLxC90McDw4AooRuX5ulcBxk dkrzKC1+0VYraCW0u9PlGuaTT33n+XETJOEkuX/w= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id E72F03847832 for ; Fri, 17 Jan 2025 13:42:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E72F03847832 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E72F03847832 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737121336; cv=none; b=wBgQ8wrk36NU//fmILUh4aTEhjJiO3B3wB/J3VD+9bqaEEfuHeFKSl9JVNfmZIjRCpTpAJQqcVDRVbJxmCL5XrCSscOpOWDBDsJ0tCI+DUG9WvYUe3u1ed87uZvLNPTYumvNk6TBLX/cGD7+bHi83hnbdXcGjizOwsx0DRYAHkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737121336; c=relaxed/simple; bh=4fMh54YGnYGtrZrPBAkH/A29RsZw2BzdqXrDVoSoH6o=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ICprKOgaLfbLnZy34Gfw2QO8WANlPc4Y4a2uG499h0/PWZxS+TDzGEsNTt0VuOTw25mTjUN/YTNSerTwJJsJhWWKIPFy/7HNryKHiZ4e5Mn2icD0fHfPv1Casc3iebi55v5/coOrNVj9BffcRA/MahKGdthJIBqNlgQWzSiRHDU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E72F03847832 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-32-85m57PEdO0SH0MLjvyAvUw-1; Fri, 17 Jan 2025 08:42:12 -0500 X-MC-Unique: 85m57PEdO0SH0MLjvyAvUw-1 X-Mimecast-MFC-AGG-ID: 85m57PEdO0SH0MLjvyAvUw Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-38bf5ef17b2so517076f8f.0 for ; Fri, 17 Jan 2025 05:42:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737121331; x=1737726131; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hU9/6F/tas4F8vk710ossm7lYL0KDQng2p7Fp/xHrKs=; b=sodS6Alb1FDdr1nw97M+mCvP7+v4Ku/i++TMIXkrgVtBoAL/oUtTLmtV/WH0ZdAXx/ 96suHXQWZqHxMVNir41satd53P4w7v2iQgjcLskJey0faZA0p+so+tjf9OQKzLHtqLoK cvdzVKiU8PHNZt4YVKlJ0BqWygH73AOWlpSgEJPgRZrYjFzDsKEIqkb20brLI9Hk3tqI DwAVm0DM4OWl9Ktk8pYp3AeHM8Gsnw06+nIhLXiS9FtAdZEt3FPvDSMnbC1TOCm9/iSJ /fx4CD+4zyi8Ugj8nnVoA8LXYIQGavuFHjfgEQ/1JNZwdxGsqBk8HhQZ5OHGSGnh0xjN OxcQ== X-Gm-Message-State: AOJu0Ywx8rUFZtX/SUv2cdogDzZEzHsj7OoUCjZcTd7uRyHAEYuiJCoq L8TuaPZBGoaVRkq/hskR9ZSH+uKJMMZ43OgkWE3hIud3Ivj/efFDTXrlqLhmGyIMhj/bGMfzWuW 0VbjGcDTw2zbIVjTgesbASu+JDiMcA5ntuvwbauk2JES1WnFZ X-Gm-Gg: ASbGncvct6OqwzdO8xA4YlEW8gzfVDiXQVGdMi4McmGTvzxzBuw4kzP46hXswG3RhAN JXUoHR4BIjj4Jt6NwuF5vDsgcyDWcOJJhnpdawFL/DipW/PhOAjCa2QB/1q9cgIdRzV6tc6MgrF tPo10zGzhDeo8u35//iA+6sg8rD2J3V6/KOMQU3C+R2+LYVvo/lMznkSm5jTNkxRqD7ipIPC32b 3ODCNTyyPvrME7MVqWIxbbA1PzCl7F/ddMyA/vQbnixxqhRLb2wqgezYlb4ixtOW4FhMsULzqEC jiiObw== X-Received: by 2002:a05:6000:4011:b0:38a:8c9f:dd61 with SMTP id ffacd0b85a97d-38bf59eccedmr2827281f8f.46.1737121331177; Fri, 17 Jan 2025 05:42:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBUttajDQJl9MZ7btTm8jOk1azhdBDo+WaM9SJftoZSTMVsjPJd0SRhLOdfNzUJt8dy8GYDQ== X-Received: by 2002:a05:6000:4011:b0:38a:8c9f:dd61 with SMTP id ffacd0b85a97d-38bf59eccedmr2827253f8f.46.1737121330836; Fri, 17 Jan 2025 05:42:10 -0800 (PST) Received: from localhost (44.226.159.143.dyn.plus.net. [143.159.226.44]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3221761sm2529525f8f.22.2025.01.17.05.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:42:10 -0800 (PST) To: Luis Machado , Tom Tromey , Simon Marchi Cc: "Aktemur, Tankut Baris via Gdb" , "Aktemur, Tankut Baris" Subject: Re: automated coding style tool In-Reply-To: References: <86538dac-6c3a-4b9e-9de9-3906e645fa4d@redhat.com> <87y16vwbzl.fsf@tromey.com> <74c8b867-f5bb-48f7-9849-11d06e63a3d7@arm.com> <87tta2r5z2.fsf@redhat.com> <87tta1qq1i.fsf@tromey.com> <2985f4ae-33c0-4e02-8982-fa132f4d3741@simark.ca> <87msftuhd3.fsf@tromey.com> Date: Fri, 17 Jan 2025 13:42:09 +0000 Message-ID: <877c6to8um.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fLw0jFULSYMYnAXEdtm6V8TZw2vVhCt1XqD0XeuPTkU_1737121331 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Andrew Burgess via Gdb Reply-To: Andrew Burgess Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" Luis Machado via Gdb writes: > On 1/14/25 23:04, Tom Tromey wrote: >> Simon> If we don't like what the tool outputs, we can argue over than >> Simon> and change the tool. >> >> Yeah - but that's where we're already at. Like, I ran clang-format on >> gdb and read the diffs and found a bunch of things I didn't like. IIRC >> the main offenders were bin-packing. I imagine Pedro did this too, >> since he's made similar comments in the past. >> >> I at least CCd myself on upstream bugs against the tool. I commented >> on some, maybe filed some too (don't remember). >> >> I'm not super interested in hacking on clang-format, but the tool is >> there and all the information for someone who is. >> >> Simon> Also, if are missing some features to get the output we want, nobody is >> Simon> going to magically implement them for us. And if we don't use the tool, >> Simon> there's no motivation for us either to go implement the changes. I >> Simon> think that the only way to get the ball rolling is to start using the >> Simon> tool, even if the output is not ideal, and then if there's something >> Simon> really annoying, one of us *might* have the motivation to go improve the >> Simon> tool. >> >> I'm in favor of using a tool but my view is that it has to meet some >> minimal standard of usefulness. I just think clang-format does not do >> this. > > That's fair. But are we factoring in the amount of time spent over the years > telling contributors "you forgot a space here", "two spaces after period"? I don't think adding this tool is going to be the magic bullet everyone seems to think it is. As a reviewer you'll either still need to learn the style in order to spot when a contributor has not running the formatting tool. Either that, or you need to apply each patch locally and the check run the formatting tool to check the formatting is correct. And the "two spaces after a period" rule is for comments, so that's not going to change (I hope). I mean, it's not that I care about 2 spaces vs 1, but we need _a_ rule so that we have consistency. I think if GDB could just move away from the mailing list and each users pushes their own patches model, over to a pull request style approach, then we could potentially have _real_ automated checks, e.g. checking the formatting. Then we have an _actual_ win. > I tend to think that is not a good use of one's time. I reviewed some output > from applying clang-format --style=gnu on gdb's sources, and it looks generally > fine to me. > > Some stuff is a bit different and some other stuff is very different. But > personally I'm willing to see this automation go through and I'm fine > adapting to a potentially new format, whatever that is. Like you, I don't particularly care what the preferred style is, just so long as we pick something and stick to it. I just don't think using a particular tool is going to be the win everyone seems to think it is. Just my thoughts. Thanks, Andrew