[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] guix system: Export <boot-parameters> accessors.
From: |
Alex Kost |
Subject: |
Re: [PATCH 1/6] guix system: Export <boot-parameters> accessors. |
Date: |
Thu, 14 Jan 2016 11:34:44 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Ludovic Courtès (2016-01-14 01:33 +0300) wrote:
> Alex Kost <address@hidden> skribis:
>
>> Ludovic Courtès (2016-01-12 23:25 +0300) wrote:
>>
>>> Alex Kost <address@hidden> skribis:
>>>
>>>> * guix/scripts/system.scm (read-boot-parameters, boot-parameters)
>>>> (boot-parameters?, boot-parameters-label, boot-parameters-root-device)
>>>> (boot-parameters-kernel, boot-parameters-kernel-arguments): Export.
>>>
>>> LGTM.
>>>
>>> Eventually (as a replacement of this patch or as a subsequent patch, as
>>> you prefer) we should move these to (gnu system) since this is where we
>>> create the ‘boot-parameters’ sexp.
>>
>> Great, I would like to make a replacement. OK for the attached patch?
>>
>> (I exported <boot-parameters> because it is used by (guix scripts system))
>
> I usually avoid exporting record type descriptors (RTDs) like
> <boot-parameters> because then, if you change the layout of fields, you
> have to update every ‘match’ clause out there, and it can be tedious and
> error-prone. Also, if the RTD is exported, then it’s trivial for other
> modules to forge records of that type.
>
> Could you instead rewrite the two occurrences in (guix system scripts)
> so they use the ‘boot-parameters-XYZ’ accessors instead of ‘match’? A
> bit more verbose, but safer.
>
> Sorry that I didn’t clarify this before!
Sure, I should have guessed to do it without clarifying. The updated
patch is attached.
0001-Move-boot-parameters-to-gnu-system.patch
Description: Text Data
[PATCH 2/6] emacs: profiles: Add 'guix-system-profile'., Alex Kost, 2016/01/10
[PATCH 4/6] emacs: Replace 'generation-diff' search with 'profile-diff'., Alex Kost, 2016/01/10
[PATCH 3/6] emacs: Find packages in system profiles., Alex Kost, 2016/01/10