Fork me on GitHub
#spacemacs
<
2019-11-26
>
Andrea Imparato14:11:41

hello, anybody here uses sayid on spacemacs?

Andrea Imparato14:11:20

I have no idea why but when I do (sayid-get-workspace) the buffer is empty πŸ˜•

Andrea Imparato14:11:22

(i’m trying to use it to debug tests)

Andrea Imparato14:11:12

the error i get on *Messages* is: sayid-find-existing-file: Wrong type argument: stringp, nil

bpiel15:11:07

@imparato.andrea Evaling the buffer first can sometimes fix the latter issue

Andrea Imparato15:11:19

i did that 😞

Andrea Imparato15:11:21

it seems like that the workspace buffer is β€œstuck”

practicalli-johnny15:11:04

I've only used the cider-debugger which works nicely for specific functions. sayid looks really powerful, but havent had chance to make use of it yet.

bpiel15:11:18

@imparato.andrea maybe you've capture too much? Do you get a timeout when it tries to render the *sayid* buffer?

Andrea Imparato15:11:14

i think i found the problem:

java.lang.NullPointerException: null
 at clojure.lang.Compiler.maybeResolveIn (Compiler.java:7309)
    clojure.core$ns_resolve.invokeStatic (core.clj:4336)
    clojure.core$ns_resolve.invokeStatic (core.clj:4325)
    clojure.core$resolve.invokeStatic (core.clj:4338)
    clojure.core$resolve.invoke (core.clj:4338)
    com.billpiel.sayid.trace$untrace_var_STAR_.invokeStatic (trace.clj:155)
    com.billpiel.sayid.trace$untrace_var_STAR_.invoke (trace.clj:151)
    com.billpiel.sayid.inner_trace3$eval7971$fn__7972.invoke (inner_trace3.clj:795)
    clojure.lang.MultiFn.invoke (MultiFn.java:233)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:657)
    clojure.core$apply.invoke (core.clj:652)
    com.billpiel.sayid.workspace$disable_all_traces_BANG_.invokeStatic (workspace.clj:114)
    com.billpiel.sayid.workspace$disable_all_traces_BANG_.invoke (workspace.clj:107)
    com.billpiel.sayid.workspace$disable_all_traces_BANG_.invokeStatic (workspace.clj:108)
    com.billpiel.sayid.workspace$disable_all_traces_BANG_.invoke (workspace.clj:107)
    clojure.lang.Var.invoke (Var.java:381)

bpiel15:11:34

oh... you tried to use inner trace?

bpiel15:11:59

I don't use it. It can blow up

bpiel15:11:10

I should remove it

bpiel15:11:26

I should do a lot of things though......... πŸ˜„

Andrea Imparato15:11:42

i was just following the sayid README

bpiel15:11:16

The example in the README worked at some point

bpiel15:11:24

but in general, the inner trace feature is not safe

Andrea Imparato15:11:01

good to know πŸ˜„

bpiel15:11:06

ha agreed

Andrea Imparato15:11:01

ok so this is how spacemacs starts the repl

Andrea Imparato15:11:04

[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[com.billpiel/sayid\ \"0.0.18\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.5.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- repl :headless :host localhost

Andrea Imparato15:11:29

after that i switch the repl to the buffer namespace

Andrea Imparato15:11:35

and load the buffer

Andrea Imparato15:11:50

then i load the namespace on sayid (sayid-trace-ns-by-pattern)

Andrea Imparato15:11:35

i get

Traced namespaces:
  15 / 15  *name_of_the_namespace*
  6 / 6  *name_of_the_namespace*
  0 / 0  *name_of_the_namespace*

Andrea Imparato15:11:53

and the (sayid-get-workspace) and it hangs

bpiel15:11:14

hmmmm.... seems like you didn't do anything that would capture data

bpiel15:11:40

meaning... given those steps, I would expect an empty **sayid** buffer

Andrea Imparato15:11:42

do i need to execute functions on the repl?

bpiel15:11:09

yes. If you were to execute name-of-ns/name-of-fn

bpiel15:11:25

then do (sayid-get-workspace)

bpiel15:11:45

you should see something

Andrea Imparato15:11:33

funny enough, same configs, same emacs on different laptop and it works

Andrea Imparato15:11:49

different project tho

Andrea Imparato15:11:58

could be that is the project the problem

Andrea Imparato15:11:08

problem, project is not mine πŸ˜„

bpiel15:11:35

yeah, I've seen sayid work in some places and not others and not known why

bpiel15:11:45

especially, when other people have reported bugs, of course

bpiel15:11:59

maybe a transitive dep??

bpiel15:11:23

so, after you execute a traced function, you still get nothing in the sayid buffer?

bpiel15:11:11

ok, that sucks

Andrea Imparato15:11:21

i see stuff on the repl so the code is running

Andrea Imparato15:11:40

and i also get the results from the function

bpiel15:11:08

gotcha. Yeah. bummer

Andrea Imparato15:11:38

hmm i gotta a workspace no idea how lol

bpiel15:11:50

the plot thickens!

Andrea Imparato15:11:55

ok i wasn’t not capturing data indeed

Andrea Imparato16:11:03

thx for the help @bpiel πŸ™‚

bpiel16:11:15

No prob! πŸ‘

Andrea Imparato16:11:26

and thx very much for having created this amazing tool

bpiel16:11:49

you're welcome!

bpiel16:11:55

good luck with it