unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Robby Zambito <contact@robbyzambito.me>
To: 64090@debbugs.gnu.org
Subject: bug#64090: Cannot compute a file with a G-exp
Date: Thu, 15 Jun 2023 21:17:47 -0400	[thread overview]
Message-ID: <87v8fogpk8.fsf@robbyzambito.me> (raw)

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




             reply	other threads:[~2023-06-16  1:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  1:17 Robby Zambito [this message]
2023-06-17  7:51 ` bug#64090: Cannot compute a file with a G-exp paren--- via Bug reports for GNU Guix
2023-06-17 14:05   ` Robby Zambito
2023-06-17 16:27     ` paren--- via Bug reports for GNU Guix
2024-09-10 15:01       ` 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=87v8fogpk8.fsf@robbyzambito.me \
    --to=contact@robbyzambito.me \
    --cc=64090@debbugs.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).