-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Figwheel-Main Support #171
Comments
Something that may make connecting chlorine and figwheel-main easier is that it is possible to expose a socket REPL on top of a figwheel-main REPL, as per the example here: https://oli.me.uk/clojure-socket-prepl-cookbook/#_figwheel_and_prepl I can telnet and issue commands to the socket-REPL-over-figwheel-REPL, but, if I try to have chlorine connect to it, chlorine silently fails. |
@rafd That's because the example starts a prepl, not a regular socket REPL. I think that if you change A plain Socket REPL has a prompt and returns text. A prepl is a programmatic REPL and has no prompt and it returns a hash map with the form read, the value returned, and also any output and errors, @mauricioszabo It would be nice if Chlorine could connect to a prepl as well as a plain Socket REPL (and probably easier, since prepl is designed for programs to talk to Clojure?). |
@seancorfield Thanks for the clarification. No
And the |
@seancorfield maybe. I believe it can work, will try to implement and see what happens :). The only problem is that prepl on Clojure does not support reader literals, that's something I really need for Chlorine to detect which REPL is currently running... @rafd this can probably work for a simple tooling support. If you want autocomplete with compliment / suitable for ClojureScript, this approach with prepl will not work, but at least figwheel will be an official supported implementation :) |
Quick update. While this is still on my radar, I have a demo repo setup which will illustrates @rafd suggestion above. Thus, @mauricioszabo is correct and we can say it's "officially" supported hehe. One thing I noticed is that depending on the CLJS version used, this approach can fail. The failing version of CLJS was I haven't done much real world experiments with it other than to see that it works, but this is a good start and nice stop gap while a more complete solution is explored. Hope this helps people! |
Wow, @athomasoriginal, great job! I'll try to wrap around everything you did on your project, but looks promising! You did say that this approach can fail because of CLJS version used. Why is that? Do you have any insight on how to solve this issue? |
Thanks, @mauricioszabo, but, just to clarify, the little demo is really just what rafd suggested...I just put it in a project, documented and experimented a bit so others could look to it if needed 🤣
Yeah, I noticed that this can happen. I actually spent a few hours digging into this a while back and and wrote about it. I'm not sure if they are linked, but symptoms are similar. When we open the URL suggested by the CLJS REPL session, and we get a connection, the connection spews a stack trace and timesout. |
What's the status of this, in the context of Pulsar? |
Not yet done. I am currently full-time on Pulsar, but things are getting more stable. In the meantime, I am making some decisions about Chlorine - one of them is that I'll probably remove support for socket-repl, which makes this solution outdated. But I'll update here as soon as I end up with a decision |
What's Up?
It would be sweet to be able to connect to the figwheel-main repl through atom.
M'kay, tell me more
Based on the quick conversation we had over slack, I wanted to start an issue and to document some of the tips you provided RE: how to tackle this problem. This will also be good to track any progress on this topic.
How to start?
The text was updated successfully, but these errors were encountered: