all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Raghav Gururajan" <raghavgururajan@disroot.org>
Cc: Development of GNU Guix and the GNU System distribution
	<guix-devel@gnu.org>, Ryan Prior <ryanprior@hey.com>
Subject: Re: Questionable "cosmetic changes" commits
Date: Fri, 4 Dec 2020 16:12:57 +0100	[thread overview]
Message-ID: <20201204161257.64363a5a@scratchpost.org> (raw)
In-Reply-To: <cace69473f8551d4e2b89f412bfcdf12@disroot.org>

[-- Attachment #1: Type: text/plain, Size: 3114 bytes --]

Hi Raghav,

first, let me say that as far as I'm concerned, you did nothing wrong--although
it caused a lot of work for you to do the rearranging in the first place
(and also some work for us).

Guix irregularities also annoy the hell out of me.  You can check out some
earlier patches by me (when I joined the project) in the archives.  I wanted
(and still want!) to rearrange a LOT of stuff--because, let's face it, Guix's
module layout in general is a mess.  But for better or for worse, it's
not easy to do anything about it and also keep backward compatibility with
what external projects expect of Guix and also keep using the tools that we
have been using so far (git, diff, patch etc).  So even though I still would
prefer Guix module layout not to suck, it cannot be changed in the short term.
So I know where you are coming from.

But in general, arguing about *formatting* is bike-shedding at its best,
especially in a language where formatting does not matter.

However, we do use textual diff, blame and merge tools--and those do not
understand the tree structure of a Lisp program at all.  Rearranging stuff
especially will (and did) cause diff and patch to mistake the insertion
point for changes.  (It will patch it wrong if applied out of order or when
skipping patches--and will often NOT fail)

So for example it's very difficult to leave off the cosmetic patch and just
apply the non-cosmetic patches that came later.

Furthermore, understand that the package fields (and guix record fields in
general) can refer to previously defined fields--so a package with reordered
fields is NOT necessarily semantically equivalent to the original one.

Try these in guix repl:

(let ((name "OUTER"))
  (package-version
   (package
     (name "INNER")
     (version name)
     (source #f)
     (build-system #f)
     (synopsis #f)
     (description #f)
     (license #f)
     (home-page #f))))

(that gives "INNER")

vs

(let ((name "OUTER"))
  (package-version
   (package
     (version name)
     (name "name")
     (source #f)
     (build-system #f)
     (synopsis #f)
     (description #f)
     (license #f)
     (home-page #f))))

(that gives "OUTER")

That means each cosmetic patch of you required some extra manual review effort
by me in order to make sure that this does not introduce semantic changes.

That said, if people post reformatting patches (especially if part of a patchset
that was presumably already tested by that person) I usually do not say anything
about it because I don't want to cause extra work that is useful to nobody (and
potentially invalidate all the testing done).

FWIW, I do find it strange that Lisp projects, despite using a minimal-syntax
language (mostly in order to conserve its regular tree structure), do not
usually automatically format source code as they check in, but Go projects,
using the prime example of an irregular C-like language, DOES usually use
code formatters automatically when checking in.  That is some strange
reversal of strengths that I wouldn't have expected.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-12-04 15:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 18:55 Questionable "cosmetic changes" commits Mark H Weaver
2020-12-02 20:13 ` Ryan Prior
2020-12-02 21:27   ` Tobias Geerinckx-Rice
2020-12-02 22:22   ` Mark H Weaver
2020-12-03  3:16   ` Bengt Richter
2020-12-02 21:33 ` Hartmut Goebel
2020-12-04  2:08 ` Raghav Gururajan
2020-12-04  3:30   ` Ryan Prior
2020-12-04  3:58     ` Raghav Gururajan
2020-12-04 15:12       ` Danny Milosavljevic [this message]
2020-12-05  6:47       ` Mark H Weaver
2020-12-05  7:06         ` Mark H Weaver
2020-12-05 20:37       ` Raghav Gururajan
2020-12-05 21:54         ` Christopher Baines
2020-12-05 23:42           ` Bengt Richter
2020-12-20  7:07           ` Raghav Gururajan via Development of GNU Guix and the GNU System distribution.
2020-12-05 23:29         ` Cosmetic changes commits as a potential security risk (was Re: Questionable "cosmetic changes" commits) Mark H Weaver
2020-12-20  6:55         ` Questionable "cosmetic changes" commits Raghav Gururajan via Development of GNU Guix and the GNU System distribution.
2020-12-20  7:00         ` Cosmetic changes commits as a potential security risk (was Re: Questionable "cosmetic changes" commits) Raghav Gururajan via Development of GNU Guix and the GNU System distribution.

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-all 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=20201204161257.64363a5a@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=raghavgururajan@disroot.org \
    --cc=ryanprior@hey.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.