Fork me on GitHub
#protorepl
<
2017-05-24
>
cpmcdaniel21:05:09

anyone trying to use Proto REPL with boot-cljs-repl?

cpmcdaniel21:05:41

I can basically get it to connect, but have all sorts of weird behavior

cpmcdaniel21:05:43

I’m having so much fun with Proto-REPL on my clj projects, I want that same experience with cljs

rgdelato21:05:47

would you mind being more specific about "all sorts of weird behavior"? how are you connecting and what are you seeing?

cpmcdaniel21:05:21

ok, first I’m setting up a boot build pipeline at the command line

cpmcdaniel21:05:27

basically this:

cpmcdaniel21:05:27

OK, so I can open another terminal and type boot repl --client and it connects to the running REPL server

cpmcdaniel21:05:50

I can then execute (start-repl) (from boot-cljs-repl), and everything works fine

cpmcdaniel21:05:30

if, instead of launching boot the second time from the term, I setup proto repl to execute boot repl --client

cpmcdaniel21:05:38

it starts up in proto-repl tab

cpmcdaniel21:05:46

seems to work

cpmcdaniel21:05:54

until I try to eval a ns form

cpmcdaniel21:05:08

maybe I shouldn’t expect that to work…

cpmcdaniel21:05:27

hold on, I got an idea

cpmcdaniel21:05:34

OK, I’ve run (start-repl) in my ProtoREPL and reloaded my browser

cpmcdaniel21:05:47

connected! >> To quit, type: :cljs/quit cljs.user=>

cpmcdaniel21:05:04

oh, completion is hosed I think

cpmcdaniel21:05:11

maybe I just need to turn that off

cpmcdaniel21:05:25

I get errors every time I press a key

rgdelato21:05:04

I have pull request that fixes some stuff with Figwheel, and it might actually also fix this same problem. But I haven't used boot really, so I'd need to actually set up a project and try it to be sure

cpmcdaniel21:05:33

I can’t seem to find the auto-complete setting now, but I know I’ve seen it before

rgdelato21:05:51

yeah, it looks like autocompletion is still broken in Figwheel too even with the recent fix. I can look at that as well

rgdelato21:05:18

it looks like proto-repl is using the compliment library for autocompletion, which still has a ticket open for supporting CLJS

cpmcdaniel21:05:35

yeah, I got the feeling it was trying to eval the CLJS code as CLJ instead

cpmcdaniel21:05:08

well, I’m willing to put some time into getting this working, but I’m going to need some guidance

rgdelato22:05:54

Here's what I've got so far: Proto REPL's autocompletion call seems to be defined here: https://github.com/jasongilman/proto-repl/blob/master/lib/completion-provider.coffee#L30-L45 Here's the GitHub issue for the compliment library about adding CLJS support: https://github.com/alexander-yakushev/compliment/issues/42

cpmcdaniel22:05:30

OK, I will follow this

cpmcdaniel22:05:16

for now, I will deal with the inefficiencies of a browser auto-reload workflow

cpmcdaniel22:05:50

but I feel like that defeats a whole lot of the purpose of Proto-REPL

cpmcdaniel22:05:05

actually, I’m just using the clojure language mode at that point

cpmcdaniel22:05:27

or I will just use Proto-REPL for my CLJ dev and go back to emacs for my CLJS work