From: "Laszlo Ersek" <lersek@redhat.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>,
Pedro Falcato <pedro.falcato@gmail.com>,
Andrew Fish <afish@apple.com>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>,
"Leif Lindholm (Quic)" <quic_llindhol@quicinc.com>
Subject: [edk2-devel] edk2 uncrustify update (73.0.8)?
Date: Mon, 13 Nov 2023 12:58:25 +0100 [thread overview]
Message-ID: <0107c96b-849a-db48-194b-1a4c1f3b0c78@redhat.com> (raw)
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").
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?
The reason I'm not just ignoring this topic is that 73.0.8 actually
produces *better output* than 73.0.3, at least in the one instance I
encountered. Compare:
> diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
> index 434cdca84b23..3a6f75988220 100644
> --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
> +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
> @@ -43,12 +43,12 @@ STATIC EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL
> STATIC CONST EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR mMmio64Configuration = {
> ACPI_ADDRESS_SPACE_DESCRIPTOR, // Desc
> (UINT16)( // Len
> - sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) -
> - OFFSET_OF (
> - EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR,
> - ResType
> - )
> - ),
> + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) -
> + OFFSET_OF (
> + EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR,
> + ResType
> + )
> + ),
> ACPI_ADDRESS_SPACE_TYPE_MEM, // ResType
> 0, // GenFlag
> 0, // SpecificFlag
> @@ -77,12 +77,12 @@ STATIC CONST EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR mMmio64Configuration = {
> STATIC CONST EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR mOptionRomConfiguration = {
> ACPI_ADDRESS_SPACE_DESCRIPTOR, // Desc
> (UINT16)( // Len
> - sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) -
> - OFFSET_OF (
> - EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR,
> - ResType
> - )
> - ),
> + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) -
> + OFFSET_OF (
> + EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR,
> + ResType
> + )
> + ),
> ACPI_ADDRESS_SPACE_TYPE_MEM, // ResType
> 0, // GenFlag
> 0, // Disable option roms SpecificFlag
Note that 73.0.3 indents the subexpression to the "//" comment on the
previous line, while 73.0.8 ignores the comment -- which I think is
justified here.
I believe this improvement may come from uncrustify commit 239c4fad745b
("Prevent endless indentation scenario in struct assignment",
2022-07-29). I think it's worth having in edk2.
CC: stewards, Pedro (commit 6ded9f50c3aa), Marcin (traditionally a big
fan of uncrustify :))
Thanks
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111147): https://edk2.groups.io/g/devel/message/111147
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 reply other threads:[~2023-11-13 11:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 11:58 Laszlo Ersek [this message]
2023-11-13 12:29 ` [edk2-devel] edk2 uncrustify update (73.0.8)? 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
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=0107c96b-849a-db48-194b-1a4c1f3b0c78@redhat.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