'inferior-with-channels' is eager, making it hard to use in channels

  • Open
  • quality assurance status badge
Details
3 participants
  • Lukasz Olszewski
  • Maxime Devos
  • Moisés Simón Vázquez
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal

Debbugs page

Maxime Devos wrote 2 years ago
(name . bug-guix)(address . bug-guix@gnu.org)
32859c29-6471-0d44-2366-a04a99fb98f7@telenet.be
As experienced by Luks6655, you can't do
(define inferior (inferior-with-channels CHANNELS))
on the top-level of a channel module. I think the issue is that
inferior-with-channels is eager (not lazy), so it cannot be used in a
channel on the top-level, as builds (including channel builds) are
isolated from the network and have limited access to the file system.
If it would be made lazy, then
(define inferior (inferior-with-channels CHANNELS))
(define-public p
(package
[...]
(inputs (list (lookup-inferior-package inferior "hello")))))
should, in theory, work (unverified).
Greetings,
Maxime.
Attachment: OpenPGP_signature
Lukasz Olszewski wrote 2 years ago
(address . 57801@debbugs.gnu.org)
CACwB4R4DBX_Z7HZPztFAWjEkiaZiN6LnVi7hRv0EmeSDpqMY0A@mail.gmail.com
Additionally this fails even when used like this:

(define inferior
(mlambda ()
(inferior-for-channels channels)))

(lookup-inferior-packages (inferior) "somepackage")
Maxime Devos wrote 2 years ago
Re: bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels
83ec830e-44a8-4fd3-8be1-08d72cc266b3@telenet.be
On 14-09-2022 19:18, Lukasz Olszewski wrote:
Toggle quote (5 lines)
> Additionally this fails even when used like this:
>
> (define inferior
> (mlambda ()
> (inferior-for-channels channels)))
This makes it lazy (not eager).
Toggle quote (1 lines)
> (lookup-inferior-packages (inferior) "somepackage")
You are running (inferior) directly after defining the lazy thing,
making it effectively _eager_ (not lazy) again.
Instead of doing this on the top-level, move the
lookup-inferior-packages to inside the 'inputs' or 'native-inputs', to
_keep_ it lazy.
Greetings,
Maxime.
Attachment: OpenPGP_signature
Moisés Simón Vázquez wrote 6 months ago
(name . Maxime Devos)(address . maximedevos@telenet.be)(name . 57801@debbugs.gnu.org)(address . 57801@debbugs.gnu.org)
87wmjgnh9y.fsf@universaldx.com
Sorry for the empty reply...

How can we define an inferior package?

some commit broke ceph and we need it. Doing this:

in top of our channels break pulling with:


,----
| (define inferior-for-ceph
| (inferior-for-channels (list (channel
| (name 'guix)
| (commit "53396a22afc04536ddf75d8f82ad2eafa5082725")))))
|
| (define ceph
| (first (lookup-inferior-packages inferior-for-ceph "ceph")))
`----


,----
| (repl-version 0 1 1)
| (exception %exception (non-self-quoting 140736906039808 "#<&store-connection-error file: \"/var/guix/daemon-socket/socket\" errno: 2>"))
`----

Do you know what would be the workaround?
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 57801
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