[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questionable "cosmetic changes" commits

From: Mark H Weaver
Subject: Questionable "cosmetic changes" commits
Date: Wed, 02 Dec 2020 13:55:36 -0500

Hello fellow Guix,

In recent months there have been several "cosmetic changes" commits that
I find questionable.  These commits reorder package fields and reindent
code that was already ordered and indented according to our conventions,
apparently in order to match the author's personal preferences.

These commits also sometimes remove useful comments, although this is
not mentioned in the commit logs and not easily noticed in the diffs
amongst the noise of reordering and reindentation.

Here are some recent examples:

I've included below one example for illustration.  The following commit
removes two comments (one about licensing details, and another
explaining why 'libffi' is needed in propagated-inputs), moves the
'home-page' field from its conventional place above the 'synopsis' to
below the 'description' (a common feature among this recent batch of
commits), swaps the order of the 'inputs' and 'native-inputs' fields,
and reindents several fields to be more vertically oriented, as
illustrated by the following change:

___ (native-search-paths
____ (list (search-path-specification
___________ (variable "GI_TYPELIB_PATH")
___________ (files '("lib/girepository-1.0")))))

was changed to:

___ (native-search-paths
____ (list
_____ (search-path-specification
______ (variable "GI_TYPELIB_PATH")
______ (files '("lib/girepository-1.0")))))

I think that commits like this are best avoided for several reasons.
Most importantly, they make merges between branches more error prone.

We all have our own personal preferences of how best to indent scheme
code, but if more of us adopted the habit of needlessly reordering
fields and reindenting code of every package we touch, as one of us
seems to have done, it could get out of hand quickly.  For example, my
personal preference would be to reverse the indentation change of the
'native-search-paths' field shown above, and to move the 'home-page'
field back above the 'synopsis' to match our usual conventions.  Should
I change those things back the next time I update that package?

What do other people think?


>From c3264f9e100ad6aefe5216002b68f3bfdcf6be95 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <>
Date: Thu, 24 Sep 2020 08:57:59 -0400
Subject: [PATCH] gnu: gobject-introspection: Make some cosmetic changes.

* gnu/packages/glib.scm (gobject-introspection): Make some cosmetic changes.

Signed-off-by: Danny Milosavljevic <>
 gnu/packages/glib.scm | 45 ++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 43523e516d..a4fa6faefb 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -429,17 +429,20 @@ dynamic loading, and an object system.")
     (name "gobject-introspection")
     (version "1.62.0")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnome/sources/"
-                   "gobject-introspection/" (version-major+minor version)
-                   "/gobject-introspection-" version ".tar.xz"))
-             (sha256
-              (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi"))
-             (patches (search-patches
-                       "gobject-introspection-cc.patch"
-                       "gobject-introspection-girepository.patch"
-                       "gobject-introspection-absolute-shlib-path.patch"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/"
+                       "gobject-introspection/" (version-major+minor version)
+                       "/gobject-introspection-" version ".tar.xz"))
+       (sha256
+        (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi"))
+       (patches
+        (search-patches
+         "gobject-introspection-cc.patch"
+         "gobject-introspection-girepository.patch"
+         "gobject-introspection-absolute-shlib-path.patch"))))
     (build-system meson-build-system)
@@ -450,25 +453,23 @@ dynamic loading, and an object system.")
                 (string-append "#!" (which "python3"))))
+    (native-inputs
+     `(("glib" ,glib "bin")
+       ("pkg-config" ,pkg-config)))
      `(("bison" ,bison)
        ("flex" ,flex)
        ("glib" ,glib)
        ("python" ,python-wrapper)
        ("zlib" ,zlib)))
-    (native-inputs
-     `(("glib" ,glib "bin")
-       ("pkg-config" ,pkg-config)))
-     `(;; In practice, GIR users will need libffi when using
-       ;; gobject-introspection.
-       ("libffi" ,libffi)))
+     `(("libffi" ,libffi)))
-     (list (search-path-specification
-            (variable "GI_TYPELIB_PATH")
-            (files '("lib/girepository-1.0")))))
+     (list
+      (search-path-specification
+       (variable "GI_TYPELIB_PATH")
+       (files '("lib/girepository-1.0")))))
     (search-paths native-search-paths)
-    (home-page "";)
     (synopsis "Generate interface introspection data for GObject libraries")
      "GObject introspection is a middleware layer between C libraries (using
@@ -476,7 +477,7 @@ GObject) and language bindings.  The C library can be 
scanned at compile time
 and generate a metadata file, in addition to the actual native C library.  Then
 at runtime, language bindings can read this metadata and automatically provide
 bindings to call into the C library.")
-    ; Some bits are distributed under the LGPL2+, others under the GPL2+
+    (home-page "";)
     (license license:gpl2+)))
 (define intltool

reply via email to

[Prev in Thread] Current Thread [Next in Thread]