GNU bug report logs - #63115
match-record cryptic error message on unbound record type

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 27 Apr 2023 14:28:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63115 in the body.
You can then email your comments to 63115 AT debbugs.gnu.org in the normal way.

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#63115; Package guix. (Thu, 27 Apr 2023 14:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 27 Apr 2023 14:28:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: match-record cryptic error message on unbound record type
Date: Thu, 27 Apr 2023 10:27:26 -0400
Hi,

When a record type is not in scope, the error message produced by the
match-record macro from (guix records) reads something like:

--8<---------------cut here---------------start------------->8---
guix/records.scm:598:32: map-fields: bad use of syntactic keyword in subform map-fields of map-fields
--8<---------------cut here---------------end--------------->8---

It'd be nicer if it could hint the developer what the error is exactly
(unknown record type).

Reproducer:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)>

(use-modules (gnu system accounts)
             (guix records))

(define dummy-account
  (user-account (name "dum") (group "dum")))

(match-record dummy-account <user-account>
  (name)
  name)

While compiling expression:
Syntax error:
guix/records.scm:598:32: map-fields: bad use of syntactic keyword in
subform map-fields of map-fields
--8<---------------cut here---------------end--------------->8---

This was caused by <user-account> not being exported from (gnu system
accounts).

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#63115; Package guix. (Thu, 27 Apr 2023 22:12:01 GMT) Full text and rfc822 format available.

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

From: "(" <paren <at> disroot.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, bug-guix <at> gnu.org,
 63115 <at> debbugs.gnu.org
Subject: Re: bug#63115: match-record cryptic error message on unbound record
 type
Date: Thu, 27 Apr 2023 23:10:52 +0100
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> When a record type is not in scope, the error message produced by the
> match-record macro from (guix records) reads something like:
>
> --8<---------------cut here---------------start------------->8---
> guix/records.scm:598:32: map-fields: bad use of syntactic keyword in subform map-fields of map-fields
> --8<---------------cut here---------------end--------------->8---

Josselin made a patch, which I adapted and submitted at
<https://issues.guix.gnu.org/63135>.




Information forwarded to bug-guix <at> gnu.org:
bug#63115; Package guix. (Thu, 27 Apr 2023 22:12:02 GMT) Full text and rfc822 format available.

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 10 Oct 2023 03:46:02 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Tue, 10 Oct 2023 03:46:02 GMT) Full text and rfc822 format available.

Message #16 received at 63115-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "(" <paren <at> disroot.org>
Cc: 63115-done <at> debbugs.gnu.org, ludo <at> gnu.org
Subject: Re: bug#63115: match-record cryptic error message on unbound record
 type
Date: Mon, 09 Oct 2023 23:45:10 -0400
Hello,

"(" <paren <at> disroot.org> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>> When a record type is not in scope, the error message produced by the
>> match-record macro from (guix records) reads something like:
>>
>> --8<---------------cut here---------------start------------->8---
>> guix/records.scm:598:32: map-fields: bad use of syntactic keyword in subform map-fields of map-fields
>> --8<---------------cut here---------------end--------------->8---
>
> Josselin made a patch, which I adapted and submitted at
> <https://issues.guix.gnu.org/63135>.

Which has since been merged, thank you!  Closing.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 07 Nov 2023 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 170 days ago.

Previous Next


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