alezost / guix.el

Emacs interface for GNU Guix package manager
https://emacs-guix.gitlab.io/website/
GNU General Public License v3.0
139 stars 16 forks source link

Issues with "size" command #27

Closed Ambrevar closed 6 years ago

Ambrevar commented 6 years ago

When the package is not installed guix.el should warn the user appropriately. Instead it returns:

When the package is installed, image mode fails with:

guix-geiser-eval: Error in evaluating guile expression: guix/scripts/size.scm:202:4: In procedure profile->page-map:
error: make-page-map: unbound variable
alezost commented 6 years ago

Sorry, I don't reproduce; it works perfectly for me. This error comes from guix itself. Does guix size ... work for you?

alezost commented 6 years ago

I think it happens because of the same problems that we discuss on guix-help list

Ambrevar commented 6 years ago

No, this is is different, I haven't set the geiser-guile-load-path this time and other transactions work. guix size ... also fails from command-line and I figured it's because guile-charting is not installed. It's actually mentioned in the manual, my bad. That said, the issue with the bad feedback when the package is not installed remains.

alezost commented 6 years ago

It should work when the package is not installed. Do you still have ~/projects/guix on the top of %load-path (I replied to your message on guix-help several minutes ago)? I think it can effect.

Ambrevar commented 6 years ago

Hmm... I think it only works when substitutes are available for the package.

alezost commented 6 years ago

When substitutes are unavailable, I see:

guix size: error: no available substitute information for ...

in the Guix REPL. Otherwise (with substitutes), the repl shows the size output. Is it the same for you?

Ambrevar commented 6 years ago

I see that now in text mode, but previously there was nothing (see my first post). In image mode there still is an error about a file that is not found.

alezost commented 6 years ago

I see that now in text mode, but previously there was nothing (see my first post).

OK, if it works now, then I think nothing can be done here.

In image mode there still is an error about a file that is not found.

Right, this happens because the file was not created (because of the substitute error). The error message can be improved though. What about the following:

Couldn't create an image file.
Please check "guix size" shell command to make sure it works.
Ambrevar commented 6 years ago

If I get it right, there can be only 2 errors:

Can we detect that and output the corresponding error message?

alezost commented 6 years ago

I think there may be other errors (like any "guix" command fails :smile:). Anyway, parsing an error just for this simple message seems too complicated for me. I think a reference to "guix size" should be OK.

Ambrevar commented 6 years ago

Alright! :)

alezost commented 6 years ago

Done in commit f220e82b2dd94fb349ae37665912a42196d53975

Thanks!