Fork me on GitHub
#cljfx
<
2022-09-16
>
Jakub Arnold13:09:03

is there a way to get the error/stacktrace when I'm evaluating expressions in cider? seems like since this returns a promise I just get the promise printed, and stuff gets updated "later", at which point I don't see anything even if the app blows up

Jakub Arnold13:09:39

like lets say I do (defn root [] ...) instead of (defn root [{:keys [title]}] ...) and eval the buffer, it seems to just work, but I don't get any window to show up --- iirc there was another case where I could eval something and it would error out and close the window but I'd not get an error message because calling (renderer) returns a pending promise

vlaaad14:09:24

deref it!

1
Jakub Arnold17:09:54

is there a way to use a var-quoted function instead of just the function in a component definition? as in to use :fx/type #'my-component instead of :fx/type my-component, so that I wouldn't have to re-evaluate every single component definition that uses my component to get the UI to update?

👀 1
vlaaad17:09:03

Yes, use :fx.opt/type->lifecycle

1
Jakub Arnold22:09:30

is there some way to make the stacktraces more filtered/reasonable? for example when I have an invalid url for an image-view the resulting stacktrace is 500 lines, and they all look the same so it's a bunch of scrolling up in cider repl on every error 😩 I guess if I deref I get the error at the bottom too tho which is nicer, but the output is still gigantic

1
vlaaad07:09:12

I'm working on a dev helper tool that will help contextualize cljfx errors in terms of component tree

vlaaad07:09:54

https://github.com/cljfx/dev — the repo. Maybe in a month or so I'll release it

🙏 1
vlaaad12:09:43

It's released now!