Ludovic Courtès (2016-01-14 01:33 +0300) wrote: > Alex Kost skribis: > >> Ludovic Courtès (2016-01-12 23:25 +0300) wrote: >> >>> Alex Kost 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 because it is used by (guix scripts system)) > > I usually avoid exporting record type descriptors (RTDs) like > 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.