Constructors created by define-configuration evaluate the fields twice

  • Open
  • quality assurance status badge
Details
One participant
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 3 months ago
(address . bug-guix@gnu.org)
87y10o7tlm.fsf@wolfsden.cz
Hello,

I discovered that every field in configuration created by
define-configuration is evaluated twice:

Toggle snippet (10 lines)
scheme@(guix-user)> ,use (gnu services configuration)
scheme@(guix-user)> (define serialize-string #f)
scheme@(guix-user)> (define-configuration test (s string ""))
scheme@(guix-user)> (test (s (pk "x")))

;;; ("x")

;;; ("x")

That probably is not intentional.

Have a nice day,
Tomas volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----

iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmdXD2UOHH5Ad29sZnNk
ZW4uY3oACgkQL7/ufbZ/wakgzxAAhWWqDKqCO3hvDcXgkAcP6SZzdProtZqChEUb
LH4PUOzUB1K8U0MJoTgnoU29bSHzn2ypBZGzr+4qEG904cVTNzEXT9m9W6B5Gmda
23jxRWdGLJKkyEmGeFoFPWl2nUDGPX2rAEGx46ZtGIKn7nX2yVZ2T4gX9pQILM0E
1qParzUWc7X+Fr6i7qFJUG85oqZrot4IfQIZowhpF8xtOVOt/LefpxgV5G1MkyTQ
OGPVGFZfZmw0plGxIJu2dYxAZR6EKbTbu9ItxDCe013v93gAFvn2m7mUUk/ayvZc
9Ojq/2uQk+uMDJ+vnVj/XNCZSXptY/WvsPdEkyJXyZwueaPyYbKT4WeVzhVGOXU6
78vcpk4fd0HBrMAaif9hnyM8M9Vgf5qGuq9AvA04BmA4I4HRbezyi0kYBC4JnrXY
qzswTupsb8axpAsloloZ+DYYl1o75K0Ihh99555dXy5nH85Iltc/GdApVaJ3cPxS
nlM3pBjFPzErJ/oaTBkPOYvk1Rz9fG6wzSmjvhIDKQ3hww07wk6aZtX3OVChmGnZ
7XVcLCm/BRNCNpG/EkeLB5Np9f1Ogj5jU5eaD1/gOTHxdEhW+vLuy1mfsgTG636W
KkZ/IHljHwmE96JestHNF8hOwm0zM9xoiEuKA2eh/jFOGZRnyUWdpsHGEAvNW8Wh
gkqRb/M=
=VcWu
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74749@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74749
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help