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 94137AC1754 for ; Mon, 13 Nov 2023 20:21:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ao1cUz4CErFoi3XnYCGEE56sHh7Q2YjDiMe0+/PUlfA=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1699906909; v=1; b=M6fDWX1/X3r+x4EN30/Dl3XPZpLqdcbYnvidb8IzEJtLnft1FWqUZrgcRhwatvfxu4vhrFZc HJe5H9X9RgHj4DqUFQIZkqw9lDjyivRBu/NnKUGfBlByBl7TUbC5Uj82BQ0/M2lkM/JqUQSBw7y gvZsnc7IC34clKYrhGAllEiQ= X-Received: by 127.0.0.2 with SMTP id MiveYY7687511xNtoSVfmNLC; Mon, 13 Nov 2023 12:21:49 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.1829.1699906908603351796 for ; Mon, 13 Nov 2023 12:21:48 -0800 X-Received: from [192.168.4.22] (unknown [47.201.241.95]) by linux.microsoft.com (Postfix) with ESMTPSA id 6984A20B74C1; Mon, 13 Nov 2023 12:21:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6984A20B74C1 Message-ID: <52d712b0-1749-4485-ba5c-fc70a9a2b462@linux.microsoft.com> Date: Mon, 13 Nov 2023 15:21:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] edk2 uncrustify update (73.0.8)? To: Pedro Falcato , devel@edk2.groups.io, lersek@redhat.com Cc: Michael Kinney , Andrew Fish , Marcin Juszkiewicz , "Leif Lindholm (Quic)" References: <0107c96b-849a-db48-194b-1a4c1f3b0c78@redhat.com> From: "Michael Kubacki" In-Reply-To: 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,mikuback@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uMbdMflXKH0lIelIRXJ9CRyIx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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="M6fDWX1/"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 11/13/2023 2:07 PM, Pedro Falcato wrote: > On Mon, Nov 13, 2023 at 11:58=E2=80=AFAM Laszlo Ersek = wrote: >> >> Hi Michael, >> >> recently I encountered an uncrustify failure on github. >> >> The reason was that my local uncrustify was *more recent* (73.0.8) than >> the one we use in edk2 CI (which is 73.0.3, per the edk2 file >> ".pytool/Plugin/UncrustifyCheck/uncrustify_ext_dep.yaml"). >=20 > Wait, you can use upstream uncrustify? I'm just using whatever > uncrustify version I took from the project-mu fork... >=20 The fork version is needed for edk2 specific conventions. More details=20 are here -=20 https://dev.azure.com/projectmu/uncrustify?anchor=3Dedk-ii-poc-details >> >> Updating the version number in the YAML file (i.e., advancing edk2 to >> version 73.0.8) seems easy enough, but: >> >> - Do you think 73.0.8 is mature enough for adoption in edk2? >> >> This upstream uncrustify release was tagged in April (and I can't see >> any more recent commits), so I assume it should be stable. >> >> - Would the version update require a whole-tree re-uncrustification? >=20 > Please, no. I didn't mind doing an initial reformatting at first, but > doing this continuously is both 1) problem-prone 2) just amazing > amounts of churn. > Let's say I have version N, you have version N+1 - we may never get > any final, formatted output as your version formats it differently > from mine. >=20 > I don't know how the CI is doing its thing atm (I haven't merged > anything myself to edk2), but the uncrustify check should be relaxed > to just a warning. There's nothing wrong with what my uncrustify > version is formatting to, there's nothing wrong with yours either, and > CI isn't necessarily wrong either. >=20 > And, to be fair, I already find uncrustify a large pain in the butt to > use (requiring a custom fork really does not help), but I find the > benefits worth it *locally*, as my coding style is also quite > different from the NT-esque style. >=20 It should be simple to update and ensure everyone is using the same=20 version. This requires stuart commands to be used=20 (https://github.com/tianocore/edk2-pytool-extensions). I know there's=20 aversion to stuart but that's how these extensions plug into the edk2=20 build process right now. If you use it, as an end user, you just run "stuart_update -c=20 .pytool/CISettings.py" and it will get the Uncrustify binary for your=20 host OS with the version used by the project. --- The version pulled and the source feed used by stuart are defined in=20 edk2 here:=20 https://github.com/tianocore/edk2/blob/master/.pytool/Plugin/UncrustifyChec= k/uncrustify_ext_dep.yaml That file and command are used locally, in CI, and the file is checked=20 into edk2. At any given point in time, a user at a given point in edk2=20 history should be using the same version and configuration. More details, for those interested, are here=20 https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formattin= g.=20 That tries to cover some niche use cases so it may seem more=20 overwhelming than it actually is to just get and use the executable. -=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 (#111178): https://edk2.groups.io/g/devel/message/111178 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-