Fork me on GitHub

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


@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?


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


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


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


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.)


I see what you mean


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


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


But it's lein that decides when that happens.


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.


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.