public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: devel@edk2.groups.io, Laszlo Ersek <lersek@redhat.com>,
	 Rebecca Cran <rebecca@bsdio.com>,
	Michael Kinney <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)?
Date: Thu, 23 Nov 2023 02:07:45 +0000	[thread overview]
Message-ID: <CAKbZUD0C-6TM=gmYAMpNC_hN+VzjkcvRxFMTA+ekYkLX036wxQ@mail.gmail.com> (raw)
In-Reply-To: <7cf7eacc-fc9e-4cad-9757-758e3bbf64dd@linux.microsoft.com>

On Thu, Nov 16, 2023 at 5:36 PM Michael Kubacki
<mikuback@linux.microsoft.com> 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/UncrustifyCheck/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-Formatting#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/ed07d7fab53b1f68b28742126dd76b55/raw/11310b59f867e217f06fbc11339f4e18f2247fe5/HowToDownloadUncrustifyLinux.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 :)

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-11-23  2:07 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
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 [this message]
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='CAKbZUD0C-6TM=gmYAMpNC_hN+VzjkcvRxFMTA+ekYkLX036wxQ@mail.gmail.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