From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: Michael Kubacki <mikuback@linux.microsoft.com>,
Pedro Falcato <pedro.falcato@gmail.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"lersek@redhat.com" <lersek@redhat.com>
Cc: Andrew Fish <afish@apple.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>,
"Leif Lindholm (Quic)" <quic_llindhol@quicinc.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] edk2 uncrustify update (73.0.8)?
Date: Mon, 13 Nov 2023 21:05:07 +0000 [thread overview]
Message-ID: <CO1PR11MB4929B0822AB1474545CC4C76D2B3A@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <52d712b0-1749-4485-ba5c-fc70a9a2b462@linux.microsoft.com>
Hi Michael,
Have you tried to upstream the edk2 specific elements to the
uncrustify project? That would be a path to remove the fork
and eventually all the distros would catch up.
Mike
> -----Original Message-----
> From: Michael Kubacki <mikuback@linux.microsoft.com>
> Sent: Monday, November 13, 2023 12:22 PM
> To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io;
> lersek@redhat.com
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Andrew Fish
> <afish@apple.com>; Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>;
> Leif Lindholm (Quic) <quic_llindhol@quicinc.com>
> Subject: Re: [edk2-devel] edk2 uncrustify update (73.0.8)?
>
> On 11/13/2023 2:07 PM, Pedro Falcato wrote:
> > On Mon, Nov 13, 2023 at 11:58 AM Laszlo Ersek <lersek@redhat.com>
> 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").
> >
> > Wait, you can use upstream uncrustify? I'm just using whatever
> > uncrustify version I took from the project-mu fork...
> >
> The fork version is needed for edk2 specific conventions. More details
> are here -
> https://dev.azure.com/projectmu/uncrustify?anchor=edk-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?
> >
> > 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.
> >
> > 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.
> >
> > 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.
> >
> It should be simple to update and ensure everyone is using the same
> version. This requires stuart commands to be used
> (https://github.com/tianocore/edk2-pytool-extensions). I know there's
> aversion to stuart but that's how these extensions plug into the edk2
> build process right now.
>
> If you use it, as an end user, you just run "stuart_update -c
> .pytool/CISettings.py" and it will get the Uncrustify binary for your
> host OS with the version used by the project.
>
> ---
>
> The version pulled and the source feed used by stuart are defined in
> edk2 here:
> https://github.com/tianocore/edk2/blob/master/.pytool/Plugin/Uncrustif
> yCheck/uncrustify_ext_dep.yaml
>
> That file and command are used locally, in CI, and the file is checked
> into edk2. At any given point in time, a user at a given point in edk2
> history should be using the same version and configuration.
>
> More details, for those interested, are here
> https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-
> Formatting.
> That tries to cover some niche use cases so it may seem more
> overwhelming than it actually is to just get and use the executable.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111181): https://edk2.groups.io/g/devel/message/111181
Mute This Topic: https://groups.io/mt/102559740/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-11-13 21:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 11:58 [edk2-devel] edk2 uncrustify update (73.0.8)? Laszlo Ersek
2023-11-13 12:29 ` Marcin Juszkiewicz
2023-11-13 19:14 ` Rebecca Cran via groups.io
2023-11-13 20:37 ` Michael Kubacki
2023-11-13 19:07 ` Pedro Falcato
2023-11-13 20:21 ` Michael Kubacki
2023-11-13 21:05 ` Michael D Kinney [this message]
2023-11-14 14:51 ` Laszlo Ersek
2023-11-14 15:12 ` Rebecca Cran via groups.io
2023-11-15 8:52 ` Laszlo Ersek
[not found] ` <17974449E158DE38.1153@groups.io>
2023-11-13 19:10 ` Pedro Falcato
2023-11-13 20:08 ` Michael Kubacki
2023-11-13 20:37 ` Rebecca Cran
2023-11-13 21:33 ` Pedro Falcato
2023-11-14 15:01 ` Laszlo Ersek
2023-11-16 8:29 ` Pedro Falcato
2023-11-16 17:36 ` Michael Kubacki
2023-11-23 2:07 ` Pedro Falcato
2023-11-17 9:08 ` Laszlo Ersek
2023-11-23 1:44 ` Pedro Falcato
2023-11-14 1:46 ` Michael Kubacki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO1PR11MB4929B0822AB1474545CC4C76D2B3A@CO1PR11MB4929.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox