From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 14C0BD80281 for ; Thu, 23 Nov 2023 02:07:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=P39nA2razbV/MFim6fFyCAxf9cEgRUvXsdJXC7u8abg=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1700705278; v=1; b=m4YKMHIugaPjP/16lWcfiLIabtMERV7Wkg4Rfn3NZzlTQvbpiITOWbMl7YF/oxtq56sLS4eu uj2ut4HjBWJViqsQEhEJ+yKsC1CMz90J9oRkPvCTMJb4HyrdZMS9udFhBoIts06rMQVK0lWMlJ0 R7hEPDlH2wLisbW4XMLkVcCs= X-Received: by 127.0.0.2 with SMTP id Xm5qYY7687511x3LF2oPm20i; Wed, 22 Nov 2023 18:07:58 -0800 X-Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by mx.groups.io with SMTP id smtpd.web11.83124.1700705278179651755 for ; Wed, 22 Nov 2023 18:07:58 -0800 X-Received: by mail-vs1-f47.google.com with SMTP id ada2fe7eead31-46263d50b29so124693137.0 for ; Wed, 22 Nov 2023 18:07:58 -0800 (PST) X-Gm-Message-State: CT2uidanWWu8NkwC8ras52G6x7686176AA= X-Google-Smtp-Source: AGHT+IEzIBbMPvLXoGcwCDgrMjyUn3FgPrldkuluXUP+IO6jdPO5Xx3xpJtBFaLsK1cJ4kmtU3N2yfArk8F7F3q/vlo= X-Received: by 2002:a05:6102:21d7:b0:462:ac46:9569 with SMTP id r23-20020a05610221d700b00462ac469569mr4488521vsg.11.1700705277301; Wed, 22 Nov 2023 18:07:57 -0800 (PST) MIME-Version: 1.0 References: <0107c96b-849a-db48-194b-1a4c1f3b0c78@redhat.com> <23dd696a-52a1-4c26-bfb6-5b5587325c42@linux.microsoft.com> <30e9b11c-ab39-4266-8981-5242542b625d@bsdio.com> <7cf7eacc-fc9e-4cad-9757-758e3bbf64dd@linux.microsoft.com> In-Reply-To: <7cf7eacc-fc9e-4cad-9757-758e3bbf64dd@linux.microsoft.com> From: "Pedro Falcato" Date: Thu, 23 Nov 2023 02:07:45 +0000 Message-ID: Subject: Re: [edk2-devel] edk2 uncrustify update (73.0.8)? To: Michael Kubacki Cc: devel@edk2.groups.io, Laszlo Ersek , Rebecca Cran , Michael Kinney , Andrew Fish , Marcin Juszkiewicz , "Leif Lindholm (Quic)" Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=m4YKMHIu; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) On Thu, Nov 16, 2023 at 5:36=E2=80=AFPM Michael Kubacki wrote: > This is the first time Uncrustify has been updated in edk2 since Dec 7, > 2021. > > https://github.com/tianocore/edk2/commits/master/.pytool/Plugin/Uncrustif= yCheck/uncrustify_ext_dep.yaml > > Its configuration has also not changed during that time. For this > update, as Laszlo said, it is a trivial update to a few files. > > Can you elaborate on "switching back and forth"? I would hope that once everything is straightened out and the fork is no longer needed, uncrustify will have a much higher churn of versions coming out. And expecting everyone to have the same version that some specific commit in EDK2 uses for uncrustify is simply unrealistic. And formatters changing the way they format a certain piece of code is not super rare. So, to pass CI, you'll have to make sure that: 1) All code is formatted by the same uncrustify version - this requires some churn from time to time to gratuitously change code that was at least deemed readable before 2) So patches go through without a hitch, everyone needs to be on the same version - this requires a back and forth between the maintainer and contributor ("Hey, CI's failing, have you formatted it using uncrustify?" "Yes I have" "What version do you have? It might not be upstream's!"). In the case of something like edk2-platforms, where there's not even CI, this will result in silent "misformatting" and people's formatters may silently re-format random parts of the code as they work on it (and this one IS a personal pain point, because all my platforms packages are formatted using uncrustify, as I cannot write NT-style code without its help). and both of these points are way more painful than just installing uncrustify using my package manager and whatever comes out of it is at least deemed "okay". > As I mentioned before, stuart makes installation simple. Simple meaning > it connects to the NuGet feed, pulls the NuGet package, and > automatically uses the appropriate build for your host OS when running > other commands. > > The installation instructions are here: > https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatt= ing#installing-uncrustify > > If you don't want to run stuart, you just need to click the link in > manual instructions and unzip to get the executable. This should only > take a couple minutes as shown here. > > https://gist.githubusercontent.com/makubacki/ed07d7fab53b1f68b28742126dd7= 6b55/raw/11310b59f867e217f06fbc11339f4e18f2247fe5/HowToDownloadUncrustifyLi= nux.gif > > --- > > I'm not a full time tools developer or anything so I don't have a lot of > time to spend on this but I truly do want to reduce pain points if there > are small tweaks to the process that can be made. The smallest improvement I can think of is just to provide Linux-friendly packaging. A .deb or a .rpm (heck, even a tarball) should work wonders when it comes to installing this on Linux. And, to be clear, I appreciate the effort you folks are making to get some sort of tooling into tianocore. The status quo now is unquestionably better than before. I early adopted this back in 2021 when it wasn't even upstreamed into EDK2, and it's great at hammering whatever comes out of my fingers into NT-style code :) --=20 Pedro -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111641): https://edk2.groups.io/g/devel/message/111641 Mute This Topic: https://groups.io/mt/102559740/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-