From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lq5CJXuTmmCQPwAAWB0awg (envelope-from ) for ; Tue, 11 May 2021 10:23:55 -0400 Received: by simark.ca (Postfix, from userid 112) id 8C11B1F11C; Tue, 11 May 2021 10:23:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 81B9F1E01F for ; Tue, 11 May 2021 10:23:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8A45388CC12; Tue, 11 May 2021 14:23:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8A45388CC12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620743033; bh=OzlhI/MGdEyZALj8jL0XV0L1LgT8F3/P/MbHS7JTM/U=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=BAS1qiLVrx7PGcUEA7uq+AIfqCVuFUiWHCa4u/Nf5uNRcmhAXTbRnlOl4l4w6Tp9S f/25e7zkyJk/xZ2k0g4TIC2SjigH/bNqwskUE2bD4RUwxgHv8wQgNkQmePdYvwyidT j7yoC23fhAhOPQ4fuxzE53/foYg7NmmG/Li10PDk= Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by sourceware.org (Postfix) with ESMTPS id A707F388CC03 for ; Tue, 11 May 2021 14:23:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A707F388CC03 Received: by mail-qk1-x72d.google.com with SMTP id q10so14695389qkc.5 for ; Tue, 11 May 2021 07:23:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OzlhI/MGdEyZALj8jL0XV0L1LgT8F3/P/MbHS7JTM/U=; b=OjT52+FfU4KWh7WDvIe498n9Qj14NsjfGIUkLrev+YRGS+mYhU5zdA2UeNlsEovzOa X5hwKHyr4n7x+sqXMGPm73Z51AoSWJEQrorTykPNoU1pdup5uf7AfUDBp7cekdUzdLHm p0+/SBCflSl3WrIshW0/Nig5cwDOeHMFZRWWJWP6LT/CB+fTO7GuidehJvb5aE36Ebg0 TljnYdZc4gXteE+D2XUcA2oeKpdt5S3Q9a2IfGYNzTHo4RA21tBz8SND4UFrTp4z+Clr uFNHl76UL5zqjJ6DibCQp9Ms0gEPUdxHFLOHou5JQ28Hk7coYNMPKLTPQJukRe3demXo HFOw== X-Gm-Message-State: AOAM530dOZC+xBDmx8WgVm/QWak4oiAmPcu58s4+pO96R80xj5urBArm paqU8yRKjbTvG++5NXKsrwiBrzOCAOMIpA== X-Google-Smtp-Source: ABdhPJxxfEZ+8YOWdaRL7UmtiIWguSbF+VlshPebGoP3P7Vpi/2+hjsPrUrvom1+JA4g0XowYCx0aA== X-Received: by 2002:a37:7944:: with SMTP id u65mr27887697qkc.29.1620743030216; Tue, 11 May 2021 07:23:50 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:40ad:215f:36bd:5b9a:ad6? ([2804:7f0:4841:40ad:215f:36bd:5b9a:ad6]) by smtp.gmail.com with ESMTPSA id b1sm11894888qtt.67.2021.05.11.07.23.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 May 2021 07:23:49 -0700 (PDT) Subject: Re: Proposal: format GDB Python files with black To: Simon Marchi , Tom Tromey , Simon Marchi via Gdb-patches References: <87lf8p9pwg.fsf@tromey.com> <086580a9-b3e8-1aa7-d7ac-b52792b8b8e1@linaro.org> <944f25ef-95cd-767b-0632-12d8df5f3706@polymtl.ca> Message-ID: Date: Tue, 11 May 2021 11:23:46 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <944f25ef-95cd-767b-0632-12d8df5f3706@polymtl.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 5/11/21 10:49 AM, Simon Marchi wrote: > On 2021-05-11 7:38 a.m., Luis Machado wrote: >>> Indeed. It's perhaps easy for me to say, because I get to choose what >>> Linux distro and version I work on (so I opt for something recent), but >>> I would still lean towards just following whatever the current latest >>> stable version is. There might be new options in the latest stable >>> version we want to use, it would be nice not to have to wait years >>> before we can use them. And I suppose there's a not too painful way to >>> get it for all the major distros out there (and for Windows and macOS, >>> there are binary releases). And you can always run it in Docker or >>> something. >> >> I suppose we could have scripts to automate this sort of task. Something that checks for the latest stable release and downloads it? A helper to make things easier and more consistent. > > Download from where? > I guess this works better for black since you can fetch it from a repo and use a particular version. Can we do something similar for clang-format without having to build the entire LLVM codebase? >> >> Can we do this server-side and take the burden off of the developers to have to do this as an additional step before pushing changes? > > We can check server-side if the formatting is good and reject the commit > if not, but I don't think we can modify the commit being pushed (I don't > think it would be a good idea if that was possible). I see. Maybe a client-side hook that formats things during a local commit will work better then. That way we can send a local commit for review and it will be properly formatted already. > > But just like black (it's on my todo list to check that), we can have a > commit hook that runs clang-format (at least just to warn you, "Hey, you > code needs to be formatted" if clang-format would change something). I guess that would as well.