[PATCH core-updates] gnu: libxkbcommon: Switch to gexp; adjust style.

  • Done
  • quality assurance status badge
Details
3 participants
  • Felix Lechner
  • Liliana Marie Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
Felix Lechner
Severity
normal
F
F
Felix Lechner wrote on 20 Sep 2022 21:23
(address . guix-patches@gnu.org)
CAFHYt55gav8sDkg=m-S57TKwNaBVRumnwsj0XXt1KMT5iLPNtA@mail.gmail.com
Hi,

This modernizes the package declaration for libxkbcommon by using
G-expressions. Also, input folders are found via their expected
relative paths (i.e. the modern way) instead of the input label. The
latter was an issue when the official xkeyboard-config was replaced
with a customized package holding additional keyboard layouts.

Ultimately reaches 3435 packages and thus belongs into core-updates.

Kind regards
Felix Lechner
From 81ffbadce5c31f447fce7970908a51d483753b14 Mon Sep 17 00:00:00 2001
From: Felix Lechner <felix.lechner@lease-up.com>
Date: Tue, 20 Sep 2022 09:47:35 -0700
Subject: [PATCH] gnu: libxkbcommon: Switch to gexp; adjust style.

* gnu/packages/xdisorg.scm (libxkbcommon): Switch to gexp; adjust
style throughout.
[arguments]: Avoid hardcoding inputs; locate inputs via relative
paths, i.e. the modern way.
---
gnu/packages/xdisorg.scm | 47 ++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 23 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 02e04ccf88..aeacdf8743 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -488,33 +488,34 @@ (define-public libxkbcommon
(name "libxkbcommon")
(version "1.3.0")
(source (origin
- (method url-fetch)
- (uri (string-append "https://xkbcommon.org/download/libxkbcommon-"
- version ".tar.xz"))
- (sha256
- (base32
- "0ysynzzgzd9jdrh1321r4bgw8wd5zljrlyn5y1a31g39xacf02bv"))))
+ (method url-fetch)
+ (uri (string-append
+ "https://xkbcommon.org/download/libxkbcommon-" version
+ ".tar.xz"))
+ (sha256
+ (base32
+ "0ysynzzgzd9jdrh1321r4bgw8wd5zljrlyn5y1a31g39xacf02bv"))))
(build-system meson-build-system)
- (inputs
- (list libx11
- libxcb
- libxml2
- wayland
- wayland-protocols
- xkeyboard-config))
- (native-inputs
- (list bison doxygen pkg-config python))
+ (inputs (list libx11
+ libxcb
+ libxml2
+ wayland
+ wayland-protocols
+ xkeyboard-config))
+ (native-inputs (list bison doxygen pkg-config python))
(arguments
- `(#:configure-flags
- (list (string-append "-Dxkb-config-root="
- (assoc-ref %build-inputs "xkeyboard-config")
- "/share/X11/xkb")
- (string-append "-Dx-locale-root="
- (assoc-ref %build-inputs "libx11")
- "/share/X11/locale"))))
+ (list #:configure-flags #~(list (string-append "-Dxkb-config-root="
+ (search-input-directory
+ %build-inputs
+ "share/X11/xkb"))
+ (string-append "-Dx-locale-root="
+ (search-input-directory
+ %build-inputs
+ "share/X11/locale")))))
(home-page "https://xkbcommon.org/")
(synopsis "Library to handle keyboard descriptions")
- (description "Xkbcommon is a library to handle keyboard descriptions,
+ (description
+ "Xkbcommon is a library to handle keyboard descriptions,
including loading them from disk, parsing them and handling their
state. It is mainly meant for client toolkits, window systems, and other
system applications; currently that includes Wayland, kmscon, GTK+, Qt,

base-commit: 28918b4ff8d2c297d1f1fb84eebdca9fc2dc9303
--
2.37.3
L
L
Liliana Marie Prikler wrote on 21 Sep 2022 11:03
e4ccf0dacc92cf133c2df88f79c8244522a5440e.camel@ist.tugraz.at
Am Dienstag, dem 20.09.2022 um 12:23 -0700 schrieb Felix Lechner:

Toggle quote (23 lines)
> + (method url-fetch)
> + (uri (string-append
> + "https://xkbcommon.org/download/libxkbcommon-"
> version
> + ".tar.xz"))


> - (inputs
> - (list libx11
> - libxcb
> - libxml2
> - wayland
> - wayland-protocols
> - xkeyboard-config))
> - (native-inputs
> - (list bison doxygen pkg-config python))
> + (inputs (list libx11
> + libxcb
> + libxml2
> + wayland
> + wayland-protocols
> + xkeyboard-config))
> + (native-inputs (list bison doxygen pkg-config python))
Try to avoid mixing cosmetic and non-cosmetic changes.

Toggle quote (14 lines)
> + (list #:configure-flags #~(list (string-append "-Dxkb-config-
> root="
> + (search-input-
> directory
> + %build-inputs
> +
> "share/X11/xkb"))
> + (string-append "-Dx-locale-
> root="
> + (search-input-
> directory
> + %build-inputs
> +
> "share/X11/locale")))))
I am very sure the formatter isn't doing the best job here.

Toggle quote (4 lines)
> - (description "Xkbcommon is a library to handle keyboard
> descriptions,
> + (description
> + "Xkbcommon is a library to handle keyboard descriptions,
This change is unnecessary.

Cheers
F
F
Felix Lechner wrote on 21 Sep 2022 12:16
(address . 57960@debbugs.gnu.org)(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)
CAFHYt54G2qxJ+uOeYwQFxpYM4DRswGqwh0X3-C3X0W9GeJ9pnQ@mail.gmail.com
Hi,

On Wed, Sep 21, 2022 at 2:03 AM Liliana Marie Prikler
<liliana.prikler@ist.tugraz.at> wrote:
Toggle quote (3 lines)
>
> Try to avoid mixing cosmetic and non-cosmetic changes.

Thanks for the suggestion! I did last time [1] but the core-updates
maintainer seemed to prefer otherwise. [2]

In addition, I was not sure whether to use the formatter from the
'master' branch or from 'core-updates', or whether it made a
difference.

A patch without 'guix style' is attached to this message.

As a side note, my position is that 'guix style' should be applied to
the code base whenever the formatter is changed, and not when
functional changes are being submitted by individual contributors.


Toggle quote (2 lines)
> the formatter isn't doing the best job here.

Do I have a choice? I believe there is a requirement to run 'guix
style' when submitting patches. [3]


Toggle quote (2 lines)
> This change is unnecessary.

I respectfully agree. The formatter made that change, too.

Kind regards
Felix Lechner
L
L
Liliana Marie Prikler wrote on 21 Sep 2022 13:28
455b0e4141d6b8bfbc437044e9cb853327253b16.camel@ist.tugraz.at
Am Mittwoch, dem 21.09.2022 um 03:16 -0700 schrieb Felix Lechner:
Toggle quote (9 lines)
> Hi,
>
> On Wed, Sep 21, 2022 at 2:03 AM Liliana Marie Prikler
> <liliana.prikler@ist.tugraz.at> wrote:
> >
> > Try to avoid mixing cosmetic and non-cosmetic changes.
>
> Thanks for the suggestion! I did last time [1] but the core-updates
> maintainer seemed to prefer otherwise. [2]
I don't think this was a preference; rather a workaround for some issue
arising in the git workflow (which can happen).

Toggle quote (3 lines)
> In addition, I was not sure whether to use the formatter from the
> 'master' branch or from 'core-updates', or whether it made a
> difference.
The answer is "don't change surrounding code", which holds regardless
of the formatter you choose. I do believe the one on master would be
updated more often, though.

Toggle quote (3 lines)
> As a side note, my position is that 'guix style' should be applied to
> the code base whenever the formatter is changed, and not when
> functional changes are being submitted by individual contributors.
I disagree on the basis that the styler is very much not perfect yet
and still causes more issues than not on almost every patch I've so far
reviewed. There's unfortunately a long way to go before we can mandate
code style.

Toggle quote (7 lines)
> > the formatter isn't doing the best job here.
>
> Do I have a choice? I believe there is a requirement to run 'guix
> style' when submitting patches. [3]
>
> [3]
> https://guix.gnu.org/en/manual/devel/en/html_node/Submitting-Patches.html
Most reviewers, myself included, would rather prefer you simply mark
the region/package with Emacs and hit TAB. However, not all packagers
prefer writing their code in Emacs, hence we tell them to use this
tool, which captures the letter, but sadly not the essence, of the
Scheme coding style.

Cheers
Toggle quote (1 lines)
>
L
L
Ludovic Courtès wrote on 2 Oct 2022 22:43
Re: bug#57960: [PATCH core-updates] gnu: libxkbcommon: Switch to gexp; adjust style.
(name . Felix Lechner)(address . felix.lechner@lease-up.com)
87k05i9ctc.fsf_-_@gnu.org
Hi Felix,

Felix Lechner <felix.lechner@lease-up.com> skribis:

Toggle quote (9 lines)
> From f07e9206be342f3e9769fe3dc14124b14444f139 Mon Sep 17 00:00:00 2001
> From: Felix Lechner <felix.lechner@lease-up.com>
> Date: Tue, 20 Sep 2022 09:47:35 -0700
> Subject: [PATCH] gnu: libxkbcommon: Switch to gexp; avoid hardcoding inputs.
>
> * gnu/packages/xdisorg.scm (libxkbcommon): Switch to gexp.
> [arguments]: Avoid hardcoding inputs and locate them via relative
> paths instead.

Applied, thanks!

As a rule of thumb I agree that formatting changes should not be lumped
together with other changes as that can hinder review.

Regardless, I think a patch like this one should not be blocked for
weeks for such tiny issues. Insisting on a rigorous process and
conventions is important when it helps us all work together, but it’s a
problem when it hinders cooperation. As reviewers, we must strike for a
balance that’s reasonable for everyone involved.

Ludo’.
L
L
Liliana Marie Prikler wrote on 3 Oct 2022 08:11
(address . 57960@debbugs.gnu.org)
efd3ade19731a057e226cb7ae5440d2a4e20e50b.camel@ist.tugraz.at
Am Sonntag, dem 02.10.2022 um 22:43 +0200 schrieb Ludovic Courtès:
Toggle quote (2 lines)
> Regardless, I think a patch like this one should not be blocked for
> weeks for such tiny issues.
Note, that this patch wasn't blocked for this issue, but because I
failed to notice the attachment in which it was already addressed.
Sometimes, I miss those.

Cheers
L
L
Ludovic Courtès wrote on 3 Oct 2022 12:02
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)
875yh11ayi.fsf@gnu.org
Hi Liliana,

Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> skribis:

Toggle quote (7 lines)
> Am Sonntag, dem 02.10.2022 um 22:43 +0200 schrieb Ludovic Courtès:
>> Regardless, I think a patch like this one should not be blocked for
>> weeks for such tiny issues.
> Note, that this patch wasn't blocked for this issue, but because I
> failed to notice the attachment in which it was already addressed.
> Sometimes, I miss those.

I see, apologies for misrepresenting the situation then.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 14 Oct 2023 22:30
control message for bug #57960
(address . control@debbugs.gnu.org)
87mswl9cbh.fsf@gnu.org
close 57960
quit
?