* geiser-xref-callers does not seem to work
@ 2017-12-16 7:55 Chris Marusich
2017-12-16 8:38 ` Chris Marusich
2017-12-18 9:34 ` Andy Wingo
0 siblings, 2 replies; 10+ messages in thread
From: Chris Marusich @ 2017-12-16 7:55 UTC (permalink / raw)
To: geiser-user; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]
Hi,
It seems that geiser-xref-callers does not work for me. I believe I've
configured Geiser correctly, since other commands like
geiser-edit-symbol-at-point and geiser-doc-symbol-at-point do work in
some cases.
Here is a specific example where it fails for me:
* Clone the Guix Git repository (for commit
9e111db4535b3cd5729e37294ae51d95240334b4 if you want to be precise):
git clone https://git.savannah.gnu.org/git/guix.git
* Configure Geiser for Guix as described in Guix's manual ((guix) The
Perfect Setup).
* Open gnu/system/vm.scm in the Guix source tree, and run
switch-to-geiser-module for the (gnu system vm) module.
* Place point on symbol expression->derivation-in-linux-vm on line 203
(in the definition of the iso9660-image procedure), and press "C-c <".
When I do this, I receive the following message in the minibuffer:
No callers found for ’expression->derivation-in-linux-vm’
And yet, if I run "M-x rgrep" on the same symbol, there are obviously
many call sites:
./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm
What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
on this symbol, it also claims that there is no documentation
available. I feel like maybe I've misconfigured something, but I don't
know what.
Here are the Geiser-specific things I've added to my ~/.emacs file:
--8<---------------cut here---------------start------------->8---
;; Tell geiser where guix checkout lives
(with-eval-after-load 'geiser-guile
(add-to-list 'geiser-guile-load-path "~/guix"))
(add-hook 'geiser-repl-mode-hook 'enable-paredit-mode)
;; Keybind customizations
(add-hook 'geiser-mode-hook
(lambda ()
(local-set-key (kbd "C-c m") 'switch-to-geiser-module)))
(add-hook 'geiser-mode-hook
(lambda ()
(local-set-key (kbd "C-c i") 'geiser-repl-import-module)))
--8<---------------cut here---------------end--------------->8---
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: geiser-xref-callers does not seem to work
2017-12-16 7:55 geiser-xref-callers does not seem to work Chris Marusich
@ 2017-12-16 8:38 ` Chris Marusich
[not found] ` <87y3m3hxts.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-18 9:34 ` Andy Wingo
1 sibling, 1 reply; 10+ messages in thread
From: Chris Marusich @ 2017-12-16 8:38 UTC (permalink / raw)
To: geiser-users; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2406 bytes --]
Whoops, geiser-user@ doesn't exist. But geiser-users@ supposedly does.
I meant to send this email there, so I will try again. Email follows:
Chris Marusich <cmmarusich@gmail.com> writes:
> Hi,
>
> It seems that geiser-xref-callers does not work for me. I believe I've
> configured Geiser correctly, since other commands like
> geiser-edit-symbol-at-point and geiser-doc-symbol-at-point do work in
> some cases.
>
> Here is a specific example where it fails for me:
>
> * Clone the Guix Git repository (for commit
> 9e111db4535b3cd5729e37294ae51d95240334b4 if you want to be precise):
>
> git clone https://git.savannah.gnu.org/git/guix.git
>
> * Configure Geiser for Guix as described in Guix's manual ((guix) The
> Perfect Setup).
>
> * Open gnu/system/vm.scm in the Guix source tree, and run
> switch-to-geiser-module for the (gnu system vm) module.
>
> * Place point on symbol expression->derivation-in-linux-vm on line 203
> (in the definition of the iso9660-image procedure), and press "C-c <".
>
> When I do this, I receive the following message in the minibuffer:
>
> No callers found for ’expression->derivation-in-linux-vm’
>
> And yet, if I run "M-x rgrep" on the same symbol, there are obviously
> many call sites:
>
> ./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
> ./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
> ./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
> ./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm
>
> What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
> on this symbol, it also claims that there is no documentation
> available. I feel like maybe I've misconfigured something, but I don't
> know what.
>
> Here are the Geiser-specific things I've added to my ~/.emacs file:
>
> ;; Tell geiser where guix checkout lives
> (with-eval-after-load 'geiser-guile
> (add-to-list 'geiser-guile-load-path "~/guix"))
>
> (add-hook 'geiser-repl-mode-hook 'enable-paredit-mode)
>
> ;; Keybind customizations
> (add-hook 'geiser-mode-hook
> (lambda ()
> (local-set-key (kbd "C-c m") 'switch-to-geiser-module)))
> (add-hook 'geiser-mode-hook
> (lambda ()
> (local-set-key (kbd "C-c i") 'geiser-repl-import-module)))
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: geiser-xref-callers does not seem to work
2017-12-16 7:55 geiser-xref-callers does not seem to work Chris Marusich
2017-12-16 8:38 ` Chris Marusich
@ 2017-12-18 9:34 ` Andy Wingo
2017-12-19 7:47 ` Chris Marusich
[not found] ` <87shc8qt0p.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>
1 sibling, 2 replies; 10+ messages in thread
From: Andy Wingo @ 2017-12-18 9:34 UTC (permalink / raw)
To: Chris Marusich; +Cc: guix-devel, geiser-users
On Sat 16 Dec 2017 08:55, Chris Marusich <cmmarusich@gmail.com> writes:
> * Place point on symbol expression->derivation-in-linux-vm on line 203
> (in the definition of the iso9660-image procedure), and press "C-c <".
>
> When I do this, I receive the following message in the minibuffer:
>
> No callers found for ’expression->derivation-in-linux-vm’
>
> And yet, if I run "M-x rgrep" on the same symbol, there are obviously
> many call sites:
>
> ./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
> ./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
> ./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
> ./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm
>
> What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
> on this symbol, it also claims that there is no documentation
> available. I feel like maybe I've misconfigured something, but I don't
> know what.
It appears to be a Geiser problem and not a Guile problem:
wingo@rusty:~/src/guix$ ./pre-inst-env guile
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (use-modules (gnu system vm))
scheme@(guile-user)> expression->derivation-in-linux-vm
$1 = #<procedure expression->derivation-in-linux-vm (name exp #:key system linux initrd qemu env-vars guile-for-build single-file-output? make-disk-image? references-graphs memory-size disk-image-format disk-image-size)>
scheme@(guile-user)> (use-modules (system xref))
scheme@(guile-user)> (procedure-callers $1)
ERROR: In procedure scm-error:
ERROR: expected a variable, symbol, or (modname . sym) #<procedure expression->derivation-in-linux-vm (name exp #:key system linux initrd qemu env-vars guile-for-build single-file-output? make-disk-image? references-graphs memory-size disk-image-format disk-image-size)>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> (procedure-callers '((gnu system vm) . expression->derivation-in-linux-vm))
$2 = (((gnu system vm) #<procedure qemu-image (#:key name system qemu disk-image-size disk-image-format file-system-type file-system-label file-system-uuid os-drv bootcfg-drv bootloader register-closures? inputs copy-inputs?)> #<procedure iso9660-image (#:key name file-system-label file-system-uuid system qemu os-drv bootcfg-drv bootloader register-closures? inputs)>))
I assume your Scheme files are indeed compiled?
Andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: geiser-xref-callers does not seem to work
2017-12-18 9:34 ` Andy Wingo
@ 2017-12-19 7:47 ` Chris Marusich
[not found] ` <87shc8qt0p.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>
1 sibling, 0 replies; 10+ messages in thread
From: Chris Marusich @ 2017-12-19 7:47 UTC (permalink / raw)
To: Andy Wingo, Jose A. Ortega Ruiz; +Cc: guix-devel, geiser-users
[-- Attachment #1: Type: text/plain, Size: 2747 bytes --]
Hi,
Thank you for the quick response!
Andy Wingo <wingo@igalia.com> writes:
> It appears to be a Geiser problem and not a Guile problem:
>
> wingo@rusty:~/src/guix$ ./pre-inst-env guile
> GNU Guile 2.2.2
> Copyright (C) 1995-2017 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (use-modules (gnu system vm))
> scheme@(guile-user)> expression->derivation-in-linux-vm
> $1 = #<procedure expression->derivation-in-linux-vm (name exp
> #:key system linux initrd qemu env-vars guile-for-build
> single-file-output? make-disk-image? references-graphs memory-size
> disk-image-format disk-image-size)>
> scheme@(guile-user)> (use-modules (system xref))
> scheme@(guile-user)> (procedure-callers $1)
> ERROR: In procedure scm-error:
> ERROR: expected a variable, symbol, or (modname . sym) #<procedure
> expression->derivation-in-linux-vm (name exp #:key system linux initrd
> qemu env-vars guile-for-build single-file-output? make-disk-image?
> references-graphs memory-size disk-image-format disk-image-size)>
>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> ,q
> scheme@(guile-user)> (procedure-callers '((gnu system vm) . expression->derivation-in-linux-vm))
> $2 = (((gnu system vm) #<procedure qemu-image (#:key name system
> qemu disk-image-size disk-image-format file-system-type
> file-system-label file-system-uuid os-drv bootcfg-drv bootloader
> register-closures? inputs copy-inputs?)> #<procedure iso9660-image
> (#:key name file-system-label file-system-uuid system qemu os-drv
> bootcfg-drv bootloader register-closures? inputs)>))
>
> I assume your Scheme files are indeed compiled?
Yes, I double-checked: even when the files are compiled, it doesn't seem
to work for me.
"Jose A. Ortega Ruiz" <jao@gnu.org> writes:
> For geiser's functionality to be active, the module's has to be loaded in
> the running guile session. Opening the file or switching to the module
> without evaluation won't make available any of its definitions to the
> running process. Have you tried compiling/loading the module? A quick
> way of accomplishing that is with C-c C-k when you're in vm.scm.
Since the files are already compiled, is this necessary? Either way, I
tried running C-c C-k (which is bound to geiser-compile-current-buffer),
and the problem still occurred.
Is this feature working for anyone else?
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <87shc8qt0p.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>]
* Re: geiser-xref-callers does not seem to work
[not found] ` <87shc8qt0p.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>
@ 2018-01-27 16:41 ` Jose A. Ortega Ruiz
2018-01-29 8:53 ` Andy Wingo
0 siblings, 1 reply; 10+ messages in thread
From: Jose A. Ortega Ruiz @ 2018-01-27 16:41 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel-mXXj517/zsQ, geiser-users-qX2TKyscuCcdnm+yROfE0A
On Mon, Dec 18 2017, Andy Wingo wrote:
> On Sat 16 Dec 2017 08:55, Chris Marusich <cmmarusich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> * Place point on symbol expression->derivation-in-linux-vm on line 203
>> (in the definition of the iso9660-image procedure), and press "C-c <".
>>
>> When I do this, I receive the following message in the minibuffer:
>>
>> No callers found for ’expression->derivation-in-linux-vm’
>>
>> And yet, if I run "M-x rgrep" on the same symbol, there are obviously
>> many call sites:
>>
>> ./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
>> ./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
>> ./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
>> ./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm
>>
>> What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
>> on this symbol, it also claims that there is no documentation
>> available. I feel like maybe I've misconfigured something, but I don't
>> know what.
>
> It appears to be a Geiser problem and not a Guile problem:
hmmm, i was investigating this. the cause geiser fails is that, in the
process of looking for other things, it's not able to find
`program-arities', exported by (system vm program). i am not sure why:
~$ guile
GNU Guile 2.2.3
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (use-modules (system vm program))
scheme@(guile-user)> program-arity
$1 = #<procedure program-arity (prog ip)>
scheme@(guile-user)> program-arities
ERROR: Unbound variable: program-arities
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
Any idea what might be wrong?
jao
--
Have a place for everything and keep the thing somewhere else; this is
not advice, it is merely custom. -- Mark Twain
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: geiser-xref-callers does not seem to work
2018-01-27 16:41 ` Jose A. Ortega Ruiz
@ 2018-01-29 8:53 ` Andy Wingo
[not found] ` <87mv0x59n3.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Andy Wingo @ 2018-01-29 8:53 UTC (permalink / raw)
To: Jose A. Ortega Ruiz
Cc: guix-devel-mXXj517/zsQ, geiser-users-qX2TKyscuCcdnm+yROfE0A
Hi!
Great to hear from you jao :)
On Sat 27 Jan 2018 17:41, "Jose A. Ortega Ruiz" <jao-mXXj517/zsQ@public.gmane.org> writes:
> hmmm, i was investigating this. the cause geiser fails is that, in the
> process of looking for other things, it's not able to find
> `program-arities', exported by (system vm program). i am not sure why:
Weird. Apologies for this, the function just doesn't exist. While
program-arity exists and calls it, program-arity itself isn't called. I
think this is detritus of refactoring :(
The facility that Guile uses now for arities is find-program-arity from
(system vm debug). It takes an address as an argument. Pass
(program-code prog) if you know you have a program. The issue is that
with Guile 2.2 there is code that doesn't necessarily have a
corresponding program object. For example a function defined in a local
context whose callers can be enumerated by the compiler can be called by
label instead of by value, and in that case the "closure" of the
function can be specialized to be e.g. a vector instead of a closure
object. So while you always have an address, you don't always have a
program object.
Relatedly, you ask about program-module. This one is sadly no longer
available. I suspect it is not coming back either :/ I think you have
to fall back on mapping procedures to files, and files to modules.
You might find a look to (system vm debug) to be useful for Geiser
purposes. Note also that the interface to local variables and stack
frames changed slightly too; see (system vm frame).
Cheers,
Andy
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-01-30 22:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-16 7:55 geiser-xref-callers does not seem to work Chris Marusich
2017-12-16 8:38 ` Chris Marusich
[not found] ` <87y3m3hxts.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-16 18:45 ` Jose A. Ortega Ruiz
2017-12-18 9:34 ` Andy Wingo
2017-12-19 7:47 ` Chris Marusich
[not found] ` <87shc8qt0p.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>
2018-01-27 16:41 ` Jose A. Ortega Ruiz
2018-01-29 8:53 ` Andy Wingo
[not found] ` <87mv0x59n3.fsf-wEGTBA9jqPzQT0dZR+AlfA@public.gmane.org>
2018-01-29 17:52 ` Jose A. Ortega Ruiz
2018-01-30 8:09 ` Andy Wingo
2018-01-30 22:55 ` [Geiser-users] " Jose A. Ortega Ruiz
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.