Fork me on GitHub
#cursive
<
2020-03-29
>
jaime14:03:20

Hello, is it normal to manually trigger load-file (cmd+shift+L) before sending forms to repl? Is there a way to watch file changes and automatically load-file?

jaime14:03:05

I always find myself in situation where I'm trying out something and my changes are not in sync with the repl.

potetm15:03:44

Yeah, that’s a common problem.

potetm15:03:18

The first thing I would suggest is trying to re-arrange your code so that you can easily load a single form without having to reload the world.

potetm15:03:59

If that’s too difficult, I would suggest a third party tool: https://github.com/clojure/tools.namespace

potetm15:03:36

Cursive does have an option to auto reload dependencies, but I’ve found it to cause problems when working on a prod REPL, so I keep it off.

potetm15:03:24

IME - Auto-loading a file is kind of fraught with problems (e.g. it reloads halfway through a change or it reloads in a bad state)

potetm15:03:52

I find it much easier to reason when I have a “reload now, please” command.

jaime17:03:22

I see. I'll stick with manually loading the files for now. Thanks for the reference, I found https://github.com/stuartsierra/component which seems like a dependency injection

dmarjenburgh18:03:57

How can you configure cursive to resolve symbols from core.logic run/fresh macros?

4
dmarjenburgh19:03:24

Ofcourse, I can resolve it as clojure.core/fn. But that doesn’t work for (run 5 [q] ...)