GNU bug report logs - #64754
‘generate-documentation’ shows evaluated default values

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 20 Jul 2023 20:56:01 UTC

Severity: normal

To reply to this bug, email your comments to 64754 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#64754; Package guix. (Thu, 20 Jul 2023 20:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 20 Jul 2023 20:56:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: ‘generate-documentation’ shows
 evaluated default values
Date: Thu, 20 Jul 2023 12:58:12 +0200
The ‘generate-documentation’ procedure of (gnu services configuration)
shows evaluated default values, as in this example:

--8<---------------cut here---------------start------------->8---
scheme@(gnu services admin)> (define serialize-string identity)
scheme@(gnu services admin)> (define-configuration foo
			       (f (string (version)) "The version string."))
scheme@(gnu services admin)> (foo)
$44 = #<<foo> f: "3.0.99-git" %location: #f>
scheme@(gnu services admin)> (display (generate-documentation `((foo ,foo-fields)) 'foo))

@c %start of fragment

@deftp {Data Type} foo
Available @code{foo} fields are:

@table @asis
@item @code{f} (default: @code{"3.0.99-git"}) (type: string)
The version string.

@end table

@end deftp


@c %end of fragment
--8<---------------cut here---------------end--------------->8---

Notice that the ‘version’ call is expanded.

This is problematic because sometimes we explicitly want to have default
values like ‘%default-xyz’ or ‘(expt 2 10)’, and this is what we want
to appear in the manual, not their evaluation result.

Ludo’.




This bug report was last modified 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.