Fork me on GitHub
#protorepl
<
2017-10-21
>
mnewhook00:10:59

when I fire up my proto repl (-main) doesn't work until I load the code. From lein repl it works. Any hints?

seancorfield00:10:26

If ProtoREPL is starting a REPL server using your project.clj, I would expect the behavior to be the same. Do you have multiple projects open in Atom?

seancorfield00:10:04

@mnewhook Ah, lein repl opens up in your :main namespace -- but ProtoREPL opens up in the user namespace.

seancorfield00:10:27

(it's been a while since I used lein -- I switched to Boot a year ago)

mnewhook00:10:21

even if I do (in-ns 'super-koalio.core.desktop-launcher) it doesn't work? or (#'super-koalio.core.desktop-launcher/-main)

seancorfield00:10:06

Are you sure the REPL you're starting in ProtoREPL is actually starting up in your project folder? It should tell you where it's starting the REPL at the top of the REPL pane...

mnewhook00:10:52

Starting REPL with lein in /Users/matthew/src/cl/play-clj-examples/super-koalio/desktop

mnewhook00:10:17

So it says:

:reloading (super-koalio.utils super-koalio.entities super-koalio.core super-koalio.core.desktop-launcher user)
proto-repl-demo dev/user.clj loaded.
Start completed

seancorfield00:10:02

Hmm, no idea then. Sorry. I did confirm that a Leiningen REPL started in ProtoREPL comes up in the user namespace, not the :main namespace -- which is why you're seeing this behavior. But I don't know why the behavior in ProtoREPL is different to just starting a REPL in a terminal 😐

mnewhook00:10:01

Its the :main super-koalio.core.desktop-launcher that messes it up. If I comment out this line it all works