all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Layout of ‘define-configuration’ records
Date: Sun, 20 Nov 2022 08:47:47 -0500	[thread overview]
Message-ID: <87fsed3fgc.fsf@gmail.com> (raw)
In-Reply-To: <8735aevdq7.fsf@gmail.com> (Katherine Cox-Buday's message of "Sat, 19 Nov 2022 14:25:20 -0700")

Hi Katherine,

Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>>> Moving the field last is problematic as we’ve seen for any user that
>>> uses ‘match’ on records—something that’s not recommended but still
>>> used a lot.
>
> Some feedback I hope is useful:
>
> I'm one such newbie, and had to stumble my way into discovering why some
> of my services suddenly broke. All I had to go on was with "invalid
> G-expression input" at a location in an `operating-system` declaration.
>
> Initially, because of the reference to gexps, I thought something had
> changed with `local-file` which I am using to deploy source code off of
> a local branch. Through trial and error and reading git logs, I
> discovered this was not the case, and saw that `define-configuration`
> had changed. From there I was able to discover the problem.
>
>> Yep. I had that on mind when I made the change, though I still missed
>> a few occurrences.
>
> I came looking for an announcement of this change somewhere on a mailing
> list (info-guix maybe?) or the Guix blog but couldn't find anything. I
> understand the focus is on in-repo code, but could we consider
> announcing changes which might affect channels and such? I don't always
> have time to stay up to date with the changes to the project :(

Apologies for causing grief!  Ironically, the change was motivated by
going through such pain myself when attempting to migrate the
mcron-configuration from a define-record-type* to a define-configuration
produced record, that's why I wanted to standardize their layout.

I'm taking yours and Ludovic's feedback into account for the future and
will reach out to guix-devel with heads-up when introducing breaking
changes to Guix APIs.  A side-note, it seems that Ludovic has been
working toward eliminating the use of match patterns matching the fields
directly, instead encouraging the use of 'match-record', see
https://issues.guix.gnu.org/59390.  I haven't checked if this is
compatible with define-configuration records though.

-- 
Thanks,
Maxim


  reply	other threads:[~2022-11-20 13:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29  3:47 [bug#58855] [PATCH 0/5] Update mcron to latest commit Maxim Cournoyer
2022-10-29  4:16 ` [bug#58855] [PATCH 1/5] services: configuration: Re-order generated record fields Maxim Cournoyer
2022-10-29  4:16   ` [bug#58855] [PATCH 2/5] services: mcron: Add log? and log-format fields to mcron-configuration Maxim Cournoyer
2022-10-29  4:16   ` [bug#58855] [PATCH 3/5] gnu: mcron: Use gexps and strip trailing #t Maxim Cournoyer
2022-10-29  4:16   ` [bug#58855] [PATCH 4/5] gnu: Remove guile2.2-mcron Maxim Cournoyer
2022-10-29  4:16   ` [bug#58855] [PATCH 5/5] gnu: mcron: Update to 1.2.1-0.5fd0ccd Maxim Cournoyer
2022-11-17 22:37   ` Layout of ‘define-configuration’ records Ludovic Courtès
2022-11-18 16:44     ` Maxim Cournoyer
2022-11-19 21:25       ` Katherine Cox-Buday
2022-11-20 13:47         ` Maxim Cournoyer [this message]
2022-11-21 10:26           ` Ludovic Courtès
2022-11-21 20:08             ` Maxim Cournoyer
2022-11-21 16:49           ` Katherine Cox-Buday
2022-11-21 21:00             ` Maxim Cournoyer
2022-11-22 14:52               ` zimoun
2022-11-25 15:18                 ` Maxim Cournoyer
2022-11-21 10:22       ` Ludovic Courtès
2022-11-21 21:16         ` Maxim Cournoyer
2022-11-23 21:56           ` Ludovic Courtès
2022-11-25 15:15             ` Maxim Cournoyer

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=87fsed3fgc.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=cox.katherine.e@gmail.com \
    --cc=guix-devel@gnu.org \
    /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.