GNU bug report logs -
#64090
Cannot compute a file with a G-exp
Previous Next
To reply to this bug, email your comments to 64090 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Fri, 16 Jun 2023 01:33:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robby Zambito <contact <at> robbyzambito.me>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 16 Jun 2023 01:33:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
I seem to be having two issues with writing a G-exp that computes a
file. The first issue I ran into is that source-module-closure returns
null no matter what modules I give it.
```
scheme@(guile-user)> (source-module-closure '((ice-9 popen) (ice-9 atomic) (ini) (json)))
$8 = ()
```
This seems to be a bug to me.
I found that I could get a partial list of dependencies using
source-module-dependencies, which seems to only include the direct
dependencies. So in my G-exp that I want to have depend on (ini), I used:
```
(with-imported-modules (source-module-dependencies '(ini)))
```
and then slowly worked on rebuilding over and over again, adding each
dependency as it was reported as missing.
Now that I have a seemingly correct (as far as the dependencies are
concerned) expression, I have run into another issue.
```
scheme@(guile-user)> ;; Assumes a file exists at wofi/style.css
scheme@(guile-user)> (define rz/terminal-emulator "foot")
scheme@(guile-user)> (import (guix gexp) (guix modules) (guix))
scheme@(guile-user)> ,build (computed-file "config" (with-imported-modules
(append (source-module-dependencies '(ini))
'((ini)
(scheme documentation)
(smc core common)
(smc context common)
(smc context u8)
(smc context char)
(smc core config)
(smc core log)
(logging logger)
(smc core state)
(smc core transition)
(smc context oop generic)
(smc context oop port)
(smc context oop char)
(smc context oop u8)
(smc fsm)
(smc core set)))
#~(begin
(import (ini))
(plain-file #$output
(with-output-to-string
(lambda ()
(scm->ini
'((#f
("stylesheet" . #$(local-file "wofi/style.css"))
("xoffset" . 0)
("yoffset" . 0)
("hide_scroll" . "true")
("show" . "drun")
("width" . "600px")
("lines" . 10)
("line_wrap" . "word")
("term" . #$rz/terminal-emulator)
("allow_markup" . "true")
("always_parse_args" . "true")
("show_all" . "true")
("print_command" . "true")
("layer" . "overlay")
("allow_images" . "true")
("insensitivity" . "true")
("prompt" . "Hey, you should type something!")
("image_size" . 25)
("display_generic" . "true")
("key_expand" . "Tab"))))))))))
warning: importing modules (ice-9 receive) (ice-9 pretty-print) (ice-9 textual-ports) from the host
building /gnu/store/icvbvnjdiykc7lsraz16j1hsydfg77ld-module-import-compiled.drv...
18% ▕████████████████████████████████████████▋ ▏While executing meta-command:
User interrupt
```
At this point, if I do not interrupt the process, it will eat up all of
my systems memory and crash. Building my config with this provides some
more information:
```
The following derivations will be built:
/gnu/store/a86dcbp4nckf40g7h7abw02viqn9aags-home.drv
/gnu/store/1mr2bjmbjwqd0qg4zbhpiajbqz8ljxvm-files.drv
/gnu/store/5rsbwalrkvd09gq554gc0dclc65vmyhj-wofi-config.drv
/gnu/store/icvbvnjdiykc7lsraz16j1hsydfg77ld-module-import-compiled.drv
/gnu/store/gn8jpf439qskxai3vyph8zv1p7ygsrsh-provenance.drv
building /gnu/store/gn8jpf439qskxai3vyph8zv1p7ygsrsh-provenance.drv...
successfully built /gnu/store/gn8jpf439qskxai3vyph8zv1p7ygsrsh-provenance.drv
building /gnu/store/icvbvnjdiykc7lsraz16j1hsydfg77ld-module-import-compiled.drv...
[ 1/50] Loading './ice-9/pretty-print.scm'...
[ 2/50] Loading './ice-9/receive.scm'...
[ 3/50] Loading './ice-9/textual-ports.scm'...
[ 4/50] Loading './ini/fsm-context-ini.scm'...
[ 5/50] Loading './ini/fsm-context.scm'...
[ 6/50] Loading './ini/fsm.scm'...
[ 7/50] Loading './ini.scm'...
[ 8/50] Loading './logging/logger.scm'...
[ 9/50] Loading './oop/goops.scm'...
interrupt
```
It hangs on importing `./oop/goops.scm`.
Regards,
Robby
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Sat, 17 Jun 2023 07:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi!
Robby Zambito <contact <at> robbyzambito.me> writes:
> scheme@(guile-user)> (source-module-closure '((ice-9 popen) (ice-9 atomic) (ini) (json)))
> $8 = ()
SOURCE-MODULE-CLOSURE only works for modules provided by Guix or Guix
channels ;) Modules included in Guile don't need it at all, and for
modules provided by third-party Guile libraries like guile-ini or
guile-json, you need to use WITH-EXTENSIONS:
(use-modules (gnu packages guile-xyz))
(with-extensions (list guile-ini guile-json) GEXP)
> I found that I could get a partial list of dependencies using
> source-module-dependencies, which seems to only include the direct
> dependencies. So in my G-exp that I want to have depend on (ini), I used:
No, it includes the entire dependency tree, but filters out any modules
that don't come from Guix or Guix channels.
> At this point, if I do not interrupt the process, it will eat up all of
> my systems memory and crash. Building my config with this provides some
> more information:
I suspect this will be fixed if you follow what I've said above.
-- (
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Sat, 17 Jun 2023 07:58:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Sat, 17 Jun 2023 14:11:02 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
"(" <paren <at> disroot.org> writes:
> SOURCE-MODULE-CLOSURE only works for modules provided by Guix or Guix
> channels ;) Modules included in Guile don't need it at all, and for
> modules provided by third-party Guile libraries like guile-ini or
> guile-json, you need to use WITH-EXTENSIONS:
>
> (use-modules (gnu packages guile-xyz))
>
> (with-extensions (list guile-ini guile-json) GEXP)
Well shucks, if only I read the next paragraph in the manual! Thank you
for pointing this out.
> No, it includes the entire dependency tree, but filters out any modules
> that don't come from Guix or Guix channels.
Strangely with-extensions doesn't seem to be including the whole
dependency tree for me. Should it? Maybe this is an issue with the
definition of the guile-ini package, but I also had to specify guile-smc
and guile-lib as extensions, even though I am not using either of those
directly.
Thank you for you help though :) I was able to get my G-Exp working as I
want
Robby
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Sat, 17 Jun 2023 14:11:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Sat, 17 Jun 2023 16:33:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 64090 <at> debbugs.gnu.org (full text, mbox):
Robby Zambito <contact <at> robbyzambito.me> writes:
> Strangely with-extensions doesn't seem to be including the whole
> dependency tree for me. Should it?
No, I don't think it should. It *would* be possible to traverse the
package inputs and add all the GUILE-BUILD-SYSTEM-using packages, but
then you get the problem that not all Guile packages have their
dependencies specified in the INPUTS list (for some reason, IIRC, you
need the Guile dependencies to be in both INPUTS *and* NATIVE-INPUTS,
but some have them only in NATIVE-INPUTS).
The problem there is that if you have a dependency that's only in
NATIVE-INPUTS, it's difficult to tell if it's actually used by the
application or by, say, a build script.
-- (
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Sat, 17 Jun 2023 16:34:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#64090
; Package
guix
.
(Tue, 10 Sep 2024 16:20:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 64090 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Sat, 17 Jun 2023 at 17:27, "(" <paren <at> disroot.org> wrote:
> Robby Zambito <contact <at> robbyzambito.me> writes:
>> Strangely with-extensions doesn't seem to be including the whole
>> dependency tree for me. Should it?
>
> No, I don't think it should. It *would* be possible to traverse the
> package inputs and add all the GUILE-BUILD-SYSTEM-using packages, but
> then you get the problem that not all Guile packages have their
> dependencies specified in the INPUTS list (for some reason, IIRC, you
> need the Guile dependencies to be in both INPUTS *and* NATIVE-INPUTS,
> but some have them only in NATIVE-INPUTS).
>
> The problem there is that if you have a dependency that's only in
> NATIVE-INPUTS, it's difficult to tell if it's actually used by the
> application or by, say, a build script.
Reading the thread and from my understanding, there is no bug. Closing?
Else, could you provide more information about the bug?
Cheers,
simon
This bug report was last modified 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.