Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on startup: Unbound variable: %max-returned-list-size #21

Closed
Ambrevar opened this issue Apr 21, 2018 · 5 comments
Closed

Error on startup: Unbound variable: %max-returned-list-size #21

Ambrevar opened this issue Apr 21, 2018 · 5 comments

Comments

@Ambrevar
Copy link

The first time I run a guix command, I get the following error:

helm-M-x: Error in evaluating guile expression: <unnamed port>:17:23: In procedure module-lookup: Unbound variable: %max-returned-list-size

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.

Running the command again works though.

@alezost
Copy link
Owner

alezost commented Apr 22, 2018

This variable (%max-returned-list-size) was added recently (by commit 00c87a9), so I guess you use Emacs-Guix from MELPA, right?

Maybe the problem is that compiled (.go) files are from the previous version. Could you switch to *Guix REPL* buffer and check %load-path and %load-compiled-path variables there to check that both .go and .scm Emacs-Guix files come from the same place?

Also you may try to remove ~/.cache/guile/ccache directory (it shouldn't do any harm; there are only auto-compiled .go files there)

@Ambrevar
Copy link
Author

Yes, I use Guix from MELPA. Note that I did not update the Guix package manager (no guix pull).

Both load paths point to the same store items.

How to reprocude:

  • Kill the guix REPL if any.
  • Run M-x guix-switch-to-repl. The error occurs.
  • Run it again. This time it's fine.

I can repeat the above process ad infinitum.

More general question: Is it possible to skip Guix-managed packages when updating all packages from the M-x list-packages menu?
In the long term I plan to switch to a full guix-controlled package management, but for now too many packages are missing.

@alezost
Copy link
Owner

alezost commented Apr 23, 2018

Yes, I use Guix from MELPA.

OK, but do you have some other version of Emacs-Guix installed otherwise (with Guix, for example)? If you install it from MELPA, then .scm files are not compiled, but it looks like Guile still finds the compiled (.go) files from another version and loads them, so there is this conflict between .scm and .go files.

Note that I did not update the Guix package manager (no guix pull).

This shouldn't matter.

Both load paths point to the same store items.

Could you show the values of these variables?

How to reprocude:

Kill the guix REPL if any.
Run M-x guix-switch-to-repl. The error occurs.
Run it again. This time it's fine.

I can repeat the above process ad infinitum.

Sorry, I cannot reproduce, I use Emacs-Guix from the git checkout and it works fine for me. My guess is that there is a mismatch between .scm and .go files somewhere.

More general question: Is it possible to skip Guix-managed packages
when updating all packages from the M-x list-packages menu?
In the long term I plan to switch to a full guix-controlled package
management, but for now too many packages are missing.

I think there is no easy way but since this 'list-package' machinery is just the elisp code, you can probably make your workaround. BTW I have the same plan (and I do nothing on implementing it 😄): I install 16 emacs packages with Guix and several dozens from melpa (quelpa rather), and I have never experienced any conflicts using this approach.

@Ambrevar
Copy link
Author

Ambrevar commented Apr 24, 2018 via email

alezost added a commit that referenced this issue Apr 25, 2018
Suggested by Pierre Neidhardt:
<#21 (comment)>.

* README: Mention potential problems with .scm and .go files.
* doc/emacs-guix.texi (Installation): Likewise.
@alezost
Copy link
Owner

alezost commented Apr 25, 2018

I think you should document this in the info file and the package description.

I have mentioned it in the manual and README (commit 2d16d16). Thanks!

As for the package description of the emacs-guix Guix package (is that
what you meant?), I doubt that this specific situation should be
mentioned there. Anyway, it's a Guix question, so if you think it
should be mentioned, please send a message to bug-guix@gnu.org.

@alezost alezost closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants