unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 27284@debbugs.gnu.org
Subject: bug#27284: [PATCH 3/4] Add (guix self) and use it when pulling.
Date: Mon, 18 Dec 2017 15:57:49 +0100	[thread overview]
Message-ID: <871sjst76a.fsf@gnu.org> (raw)
In-Reply-To: <20171211105253.9670-4-ludo@gnu.org> ("Ludovic \=\?utf-8\?Q\?Cour\?\= \=\?utf-8\?Q\?t\=C3\=A8s\=22's\?\= message of "Mon, 11 Dec 2017 11:52:52 +0100")

Hello,

As Marius reported on IRC, pulling this branch from current master fails
along these lines:

--8<---------------cut here---------------start------------->8---
$ guix pull --url=$PWD --branch=wip-pull-reload
Updating from Git repository at '/home/ludo/src/guix'...
Building from Git commit 0f34a0f4bc3f7c5483c0c9b09b1e4bf00b85271d...
Unloading current modules...
Loading new modules...
New modules successfully loaded.
Backtrace:
In ice-9/boot-9.scm:
    837:9 19 (catch _ _ #<procedure 7f2a395c6270 at guix/ui.scm:632:6 (key proc format-string format-args . res…> …)
    837:9 18 (catch _ _ #<procedure 7f2a361d3aa0 at guix/scripts/pull.scm:244:4 (key err)> _)
In guix/scripts/pull.scm:
   280:17 17 (_)
In guix/store.scm:
  1443:24 16 (run-with-store _ _ #:guile-for-build _ #:system _ #:target _)
In guix/scripts/pull.scm:
    178:2 15 (_ _)
In unknown file:
          14 (_ #<procedure d86ee60 at ice-9/eval.scm:330:13 ()> #<procedure d86ee40 at ice-9/eval.scm:336:13 (…> …)
In guix/packages.scm:
  1207:17 13 (_ #<build-daemon 256.97 2bd6f50>)
   834:14 12 (cache! #<weak-table 0/113> #<package guile@2.2.2 /gnu/store/3pmjcni27k2kx103l2v56ivcpqg95nvb-guix…> …)
In unknown file:
          11 (_ #<procedure thunk ()> #<procedure list _> #<undefined>)
In guix/packages.scm:
  1154:22 10 (thunk)
  1087:25  9 (bag->derivation #<build-daemon 256.97 2bd6f50> #<<bag> name: "guile-2.2.2" system: "x86_64-linux"…> …)
In srfi/srfi-1.scm:
   592:17  8 (map1 (("source" #<origin "mirror://gnu/guile/guile-2.2.2.tar.xz" dsi2iymx7mnn5osp2yvcl36pgyq4…>) …))
In ice-9/boot-9.scm:
    837:9  7 (catch srfi-34 #<procedure 1b033780 at guix/packages.scm:898:5 ()> #<procedure 1ae27de0 at guix/pa…> …)
In guix/packages.scm:
   903:18  6 (_)
In guix/store.scm:
  1443:24  5 (run-with-store _ _ #:guile-for-build _ #:system _ #:target _)
In guix/packages.scm:
   1255:5  4 (_ _)
In unknown file:
           3 (_ #<procedure 1ae284e0 at ice-9/eval.scm:330:13 ()> #<procedure 1ae284c0 at ice-9/eval.scm:336:13…> …)
In ice-9/eval.scm:
    159:9  2 (_ #(#(#<directory (guix download) 12d05dc0> #<weak-table 0/31>) #<build-daemon 256.97 2bd6f50>))
   293:34  1 (_ #(#(#(#<directory (guix download) 12d05dc0> #<weak-table 0/31>) #<build-daemon 256.97 2bd6f…>) #))
In guix/store.scm:
  1164:17  0 (_ #<build-daemon 256.97 2bd6f50>)

guix/store.scm:1164:17: guix/store.scm:1164:17: In procedure nix-server-major-version: Wrong type argument: #<build-daemon 256.97 2bd6f50>

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
--8<---------------cut here---------------end--------------->8---

This comes from the fact that current master doesn’t protect against
module reloads like this branch does:

> +(define (build-and-install mdrv)
> +  "Bind MDRV, a monadic value for a derivation, build it, and finally install
> +it as the latest Guix."
> +  (define do-it
> +    ;; Weirdness follows!  Before we were called, the Guix modules have
> +    ;; probably been reloaded, leading to a "parallel universe" with disjoint
> +    ;; record types.  However, procedures in this file have already cached the
> +    ;; module relative to which they lookup global bindings (see
> +    ;; 'toplevel-box' documentation), so they're stuck in the old world.  To
> +    ;; work around that, evaluate our procedure in the context of the "new"
> +    ;; (guix scripts pull) module--which has access to the new <derivation>
> +    ;; record, and so on.
> +    (eval '(lambda (mdrv cont)
> +             ;; Reopen a connection to the daemon so that we have a record
> +             ;; with the new type.
> +             (with-store store
> +               (run-with-store store
> +                 (mlet %store-monad ((drv mdrv))
> +                   (mbegin %store-monad
> +                     (what-to-build (list drv))
> +                     (built-derivations (list drv))
> +                     (return (cont (derivation->output-path drv))))))))
> +          (resolve-module '(guix scripts pull)))) ;the new module
> +
> +  (do-it mdrv
> +         (lambda (result)
> +           (install-latest result (config-directory)))))

I’m thinking that perhaps a middle ground would be to skip the reload
thing when we detect that the calling ‘guix’ is not prepared for module
reloads.

Ludo’.

  reply	other threads:[~2017-12-18 14:58 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  8:39 bug#27284: Memory leak in 'guix pull' or 'make' in guix source ng0
2017-06-08 15:02 ` ng0
2017-09-19 20:48 ` Ludovic Courtès
2017-09-20  2:40   ` Maxim Cournoyer
2017-09-20 11:42     ` Ludovic Courtès
2017-09-20 18:29       ` Maxim Cournoyer
2017-09-20 20:12         ` Ludovic Courtès
2017-09-21 14:43           ` Maxim Cournoyer
2017-09-23 18:14       ` Taylan Ulrich Bayırlı/Kammer
2017-09-24 19:44         ` Ludovic Courtès
2017-09-25 21:00           ` Maxim Cournoyer
2017-10-20 16:05   ` bug#27284: [PATCH 0/8] 'guix pull' creates several derivations Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile) Ludovic Courtès
2017-10-22 21:22       ` Maxim Cournoyer
2017-10-23  1:50         ` Ludovic Courtès
2017-10-22 21:42           ` Eric Bavier
2017-10-23  2:51             ` Ludovic Courtès
2017-10-22 22:52               ` Eric Bavier
2017-10-23  5:10                 ` Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 2/8] build: Honor make's '-j' flag Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 3/8] discovery: Move 'file-name->module-name' to (guix modules) Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 4/8] gexp: Add 'file-union' Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 5/8] gexp: Add 'directory-union' Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 6/8] union: Parametrize the symlink procedure Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 7/8] gexp: 'directory-union' has a #:quiet? parameter Ludovic Courtès
2017-10-20 16:05     ` bug#27284: [PATCH 8/8] DRAFT Add (guix self) and use it when pulling Ludovic Courtès
2017-10-22 20:05       ` Maxim Cournoyer
2017-10-27 23:49         ` Ludovic Courtès
2017-11-21 22:26     ` bug#27284: [PATCH 0/8] 'guix pull' creates several derivations Ludovic Courtès
2017-11-21 22:56       ` Ludovic Courtès
2017-12-11 10:52         ` bug#27284: [PATCH 0/4] 'guix pull' reloads modules, second try Ludovic Courtès
2017-12-11 10:52           ` bug#27284: [PATCH 1/4] gnu: Fix ambiguous 'zip' reference Ludovic Courtès
2017-12-11 10:52           ` bug#27284: [PATCH 2/4] gexp: 'computed-file' has a new #:guile parameter Ludovic Courtès
2017-12-11 10:52           ` bug#27284: [PATCH 3/4] Add (guix self) and use it when pulling Ludovic Courtès
2017-12-18 14:57             ` Ludovic Courtès [this message]
2018-03-27  9:14               ` bug#27284: ‘guix pull’ builds using multiple derivations Ludovic Courtès
2018-03-27 14:33                 ` Ludovic Courtès
2018-03-27 19:25                 ` Nils Gillmann
2018-03-27 20:51                   ` Ludovic Courtès
2018-04-08 16:37                 ` Ludovic Courtès
2018-04-09 19:53                   ` Ricardo Wurmus
2018-04-10 21:53                     ` bug#27284: ‘guix pull’ broken on Guile 2.0 Ludovic Courtès
2018-04-10 23:18                       ` bug#31117: " Ludovic Courtès
2018-04-14 17:39                         ` Ricardo Wurmus
2017-12-11 10:52           ` bug#27284: [PATCH 4/4] pull: Reload modules before doing anything else Ludovic Courtès
2017-11-12 21:33   ` bug#27284: Memory leak in 'guix pull' or 'make' in guix source Ludovic Courtès
2017-11-13  8:59     ` Ricardo Wurmus
2017-11-13  9:28       ` Ludovic Courtès
2017-11-13 14:09         ` Ricardo Wurmus
2017-11-13 17:48           ` Ricardo Wurmus
2017-11-14  7:54           ` Ludovic Courtès

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=871sjst76a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27284@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).