Fork me on GitHub
#cider
<
2016-07-02
>
malabarba14:07:45

@radon Cider doesn't load any of your namespaces when starting up. That's probably refactornrepl

radon17:07:16

@malabarba: Really? When I start a plain lein repl, whatever namespace I’ve set as :main in project.clj is automatically loaded and switched to. I would have expected CIDER to do the same by default; is this not the case?

bvulpes17:07:38

y'all want {:repl-options {:init-ns foo}} somewhere in project.clj

bvulpes17:07:39

in order for repl-opening processes like cursive or cider to drop you into the right ns, precompiled

bvulpes17:07:52

i think leiningen does this implicitly with the :main ns, as radon pointed out

radon18:07:30

Right. This part is working. That is, I’m in the :main namespace when I cider-jack-in. However, I work on quite a large project that loads configuration files, makes database connections, etc. when it is loaded. Sometimes there’s an error message, which I need to know about. The problem is, all of these messages, which show up in lein repl, do not show up in *cider-repl*, but only in *nrepl-server*, which means I’m not aware of any errors that occur unless I check manually. Ideally, I’d like cider-jack-in to open *cider-repl* immediately, wherein all the initialization messages (if any) would be shown, and then the REPL prompt would appear after everything is loaded. (Like lein repl.)

malabarba18:07:31

I see what you mean

malabarba18:07:50

I'm not sure if there's anything cider can do.

malabarba18:07:37

The repl buffer is started as soon as we know that the nrepl server has started.

malabarba18:07:08

But it's lein that decides when that happens.

malabarba18:07:41

I guess lein chooses to load your namespaces first, and then start the repl. It makes sense, but it means that the repl doesn't exist yet by the time the exceptions are thrown.

malabarba22:07:14

I suppose we could do some basic parsing of the nrepl-server buffer, and display it if we detect there's an exception in there.