all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels
@ 2022-09-14 12:28 Maxime Devos
  2022-09-14 17:18 ` Lukasz Olszewski
  2024-09-13  8:36 ` Moisés Simón Vázquez
  0 siblings, 2 replies; 4+ messages in thread
From: Maxime Devos @ 2022-09-14 12:28 UTC (permalink / raw)
  To: 57801


[-- Attachment #1.1.1: Type: text/plain, Size: 641 bytes --]

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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels
  2022-09-14 12:28 bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels Maxime Devos
@ 2022-09-14 17:18 ` Lukasz Olszewski
  2022-09-15 15:46   ` Maxime Devos
  2024-09-13  8:36 ` Moisés Simón Vázquez
  1 sibling, 1 reply; 4+ messages in thread
From: Lukasz Olszewski @ 2022-09-14 17:18 UTC (permalink / raw)
  To: 57801

Additionally this fails even when used like this:

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

(lookup-inferior-packages (inferior) "somepackage")




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels
  2022-09-14 17:18 ` Lukasz Olszewski
@ 2022-09-15 15:46   ` Maxime Devos
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2022-09-15 15:46 UTC (permalink / raw)
  To: Lukasz Olszewski, 57801


[-- Attachment #1.1.1: Type: text/plain, Size: 566 bytes --]



On 14-09-2022 19:18, Lukasz Olszewski wrote:
> Additionally this fails even when used like this:
> 
> (define inferior
>    (mlambda ()
>      (inferior-for-channels channels)))

This makes it lazy (not eager).

> (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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels
  2022-09-14 12:28 bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels Maxime Devos
  2022-09-14 17:18 ` Lukasz Olszewski
@ 2024-09-13  8:36 ` Moisés Simón Vázquez
  1 sibling, 0 replies; 4+ messages in thread
From: Moisés Simón Vázquez @ 2024-09-13  8:36 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 57801@debbugs.gnu.org

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)
|                                 (url "https://git.savannah.gnu.org/git/guix.git")
|                                 (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?




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-13 11:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-14 12:28 bug#57801: 'inferior-with-channels' is eager, making it hard to use in channels Maxime Devos
2022-09-14 17:18 ` Lukasz Olszewski
2022-09-15 15:46   ` Maxime Devos
2024-09-13  8:36 ` Moisés Simón Vázquez

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.