unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ivan Vilata i Balaguer <ivan@selidor.net>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: help-guix@gnu.org
Subject: Re: Emacs not seeing newer packages after pull
Date: Tue, 31 Mar 2020 20:04:16 -0400	[thread overview]
Message-ID: <20200401000416.GK6131@sax.terramar.selidor.net> (raw)
In-Reply-To: <m1o8scmlfl.fsf@kh-macbookpro.home>

Konrad Hinsen (2020-03-31 20:25:02 +0200) wrote:

> I did some experiments in the Guix REPL created by emacs-guix, but
> I don't understand what's happening. Here I am exploring
> emacs-caps-lock, a package that I got with today's pull:
> 
> scheme@(emacs-guix)> (%search-load-path "gnu/packages/emacs-xyz")
> $4 = "/home/hinsen/.config/guix/current/share/guile/site/3.0/gnu/packages/emacs-xyz.scm"
> 
> Looks OK. Let's look at the module and its filename:
> 
> scheme@(emacs-guix)> (resolve-module '(gnu packages emacs-xyz))
> $5 = #<directory (gnu packages emacs-xyz) 7fb01ffb3280>
> scheme@(emacs-guix)> (module-filename (resolve-module '(gnu packages emacs-xyz)))
> $6 = "gnu/packages/emacs-xyz.scm"
> 
> A relative filename, but relative to what? Why isn't this an absolute
> one? As for the package:
> 
> scheme@(emacs-guix)> (module-variable (resolve-module '(gnu packages emacs-xyz)) 'emacs-caps-lock)
> $7 = #f
> 
> It's not in there (but it is in the source code). And now for the real
> surprise:
> 
> scheme@(emacs-guix)> (reload-module (resolve-module '(gnu packages emacs-xyz)))
> $8 = #<directory (gnu packages emacs-xyz) 7fb01ffb3280>
> scheme@(emacs-guix)> (module-filename (resolve-module '(gnu packages emacs-xyz)))
> $9 = "/home/hinsen/.config/guix/current/share/guile/site/3.0/gnu/packages/emacs-xyz.scm"
> scheme@(emacs-guix)> (module-variable (resolve-module '(gnu packages emacs-xyz)) 'emacs-caps-lock)
> $10 = #<variable 7fb010e61210 value: #<package emacs-caps-lock@1.0 /home/hinsen/.config/guix/current/share/guile/site/3.0/gnu/packages/emacs-xyz.scm:1745 7fb01398ef20>>
> 
> What the heck has Guile been loading the first time???

Thanks Konrad for investigating this!  After seeing your tests, I came back to
the `guix-repl-use-latest` variable.  According to info:

> Set this variable to nil, if you don’t want to use the latest Guix code
> received with ‘guix pull’ command.

My variable is `t` as defined at emacs-guix's `guix-repl.el`.  It is used in
the `guix-repl-guile-args` to set the command line args for Guile.  According
to `ps` in my system, I see these arguments:

    /gnu/store/…-guile-2.2.6/bin/guile --no-auto-compile \
      -L /gnu/store/…-emacs-guix-0.5.2/share/guile/site/2.2 \
      -C /gnu/store/…-emacs-guix-0.5.2/lib/guile/2.2/site-ccache \
      -L /home/ivan/.config/guix/current/share/guile/site/3.0 \
      -C /home/ivan/.config/guix/current/lib/guile/3.0/site-ccache \
      -L /gnu/store/…-guix-1.0.1-14.c2f9ea2/share/guile/site/2.2 \
      -C /gnu/store/…-guix-1.0.1-14.c2f9ea2/lib/guile/2.2/site-ccache \
      --listen=/tmp/emacs-guix-…/repl-socket -q \
      -L /gnu/store/…-emacs-geiser-0.11.2/share/geiser/guile/

Please note the `-L …-guix-1.0.1-14… -C …-guix-1.0.1-14…`, this is added in
the `guix-repl-guile-args` function from the value of the variable
`guix-config-guix-scheme-directory`, defined in emacs-guix's
`guix-build-config.el` as
`/gnu/store/…-guix-1.0.1-14.c2f9ea2/share/guile/site/2.2`.

If I run `guix package -s guix`, the version of the `guix` package (which I
assume is the same that I got after the last `guix pull`, but I may be wrong)
is `1.0.1-15…`.

I guess that the Guile binary and `…-guix-1.0.1-14…` coming from emacs-guix
are unavoidable, the issue may be whether the `.config/guix/current` paths are
really taking precedence over emacs-guix's hardwired ones.

Now, if I do `guix package -u guix emacs-guix emacs-magit OTHER_DEPS…`, run
Emacs and invoke the package list, `ps` shows:

    /gnu/store/…-guile-2.2.6/bin/guile --no-auto-compile \
        -L /gnu/store/…-emacs-guix-0.5.2/share/guile/site/2.2 \
        -C /gnu/store/…-emacs-guix-0.5.2/lib/guile/2.2/site-ccache \
        -L /home/ivan/.config/guix/current/share/guile/site/3.0 \
        -C /home/ivan/.config/guix/current/lib/guile/3.0/site-ccache \
        --listen=/tmp/emacs-guix-…/repl-socket -q \
        -L /gnu/store/…-emacs-geiser-0.11.2/share/geiser/guile/

Please note that the hardwired Guix paths are no longer there.  Now the
package list only shows `guix` and `emacs-magit` as "from the future" (why?),
and some "obsolete" packages, which is fine.

Maybe I should just `guix package -u` this time and check if the problem
repeats with the next pull…

Thanks again!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/

  reply	other threads:[~2020-04-01  0:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31  4:47 Emacs not seeing newer packages after pull Ivan Vilata i Balaguer
2020-03-31 14:08 ` Konrad Hinsen
2020-03-31 18:25   ` Konrad Hinsen
2020-04-01  0:04     ` Ivan Vilata i Balaguer [this message]
2020-04-02  7:20       ` Konrad Hinsen
2020-04-07  0:44         ` Ivan Vilata i Balaguer
2020-04-07  8:16           ` Konrad Hinsen
2020-04-07 19:44             ` Ivan Vilata i Balaguer
2020-04-09  1:25               ` Ivan Vilata i Balaguer

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=20200401000416.GK6131@sax.terramar.selidor.net \
    --to=ivan@selidor.net \
    --cc=help-guix@gnu.org \
    --cc=konrad.hinsen@fastmail.net \
    /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.
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).