From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "info-guix@gnu.org mailing list" <info-guix@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Proposed (guix platforms) lookup procedures API change
Date: Fri, 13 Jan 2023 22:23:35 -0500 [thread overview]
Message-ID: <87fscder48.fsf@gmail.com> (raw)
Hello,
There is currently a proposed change [0] to modify the behavior of the
LOOKUP-PLATFORM-BY-SYSTEM, LOOKUP-PLATFORM-BY-TARGET and
LOOKUP-PLATFORM-BY-TARGET-OR-SYSTEM public procedures from (guix
platforms) that would have them return an exception instead of #f when
no platform could be found.
[0] https://issues.guix.gnu.org/60802
This is motivated so that a clearer error can be produced when these
procedures are used deep in the following reproducer:
--8<---------------cut here---------------start------------->8---
(use-modules (guix packages)
(gnu packages cross-base))
(define linux-libre-headers-cross-mips64el-linux-gnuabi64
(cross-kernel-headers "mips64el-linux-gnuabi64"))
(package-arguments linux-libre-headers-cross-mips64el-linux-gnuabi64)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guix-user) [1]> ,bt
In gnu/packages/cross-base.scm:
388:33 1 (loop (#:phases (modify-phases %standard-phases (delete (quote configure)) (# (…) …) …) …) …)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
--8<---------------cut here---------------end--------------->8---
With the change installed, the backtrace now reads as:
--8<---------------cut here---------------start------------->8---
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
1. &platform-not-found-error
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guix-user) [1]> ,bt
In gnu/packages/cross-base.scm:
383:15 3 (arguments #<package linux-libre-headers-cross-mips64el-linux-gnuabi64@5.10.35 gnu/packag…>)
In gnu/packages/linux.scm:
693:27 2 (arguments #<package linux-libre-headers@5.10.35 gnu/packages/linux.scm:672 7f409be93a50>)
In guix/platform.scm:
130:6 1 (lookup-platform-by-target-or-system "x86_64-linux")
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
--8<---------------cut here---------------end--------------->8---
which more directly communicates the source of the problem.
For more information, see the issue that motivated it:
https://issues.guix.gnu.org/60786
--
Thanks,
Maxim
next reply other threads:[~2023-01-14 3:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 3:23 Maxim Cournoyer [this message]
2023-01-16 10:51 ` Proposed (guix platforms) lookup procedures API change Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fscder48.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=guix-devel@gnu.org \
--cc=info-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).