Skip to content
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

ClojureScript support #5

Open
devth opened this issue Mar 27, 2017 · 5 comments
Open

ClojureScript support #5

devth opened this issue Mar 27, 2017 · 5 comments

Comments

@devth
Copy link

devth commented Mar 27, 2017

Thoughts on supporting CLJS?

@hkupty
Copy link
Member

hkupty commented Mar 27, 2017

I've never actually worked with CLJS, but I'd like to add support.
Not really sure about how to do that, though.

I'll take a look at piggieback to understand some more about it.

This will probably be the next major bump.

@SevereOverfl0w
Copy link
Member

Pseudo-code of python written in Clojure

(defn get-session
  [path]
  (if (string/ends-with? path ".cljs")
    (:cljs-session @state)
    (:session @state)))

To initialize the cljs session, you clone the current session (and get a new id), and call a user-supplied repl-env function. The one provided by boot-cljs-repl is the most stable in my experience. This will turn the new session into a cljs session.

@devth
Copy link
Author

devth commented Jul 13, 2017

Some thoughts coming from working with .cljc files with fireplace.vim: fireplace only lets you connect to a single nrepl (either piggieback-or-similar for CLJS or a normal CLJ nrepl). When working with .cljc files it'd be very useful to be connected to both, and allow requires or any other sort of evals to target either CLJ or CLJS repls.

Not sure what the UX would be like. Separate mappings for CLJ and CLJS? Or some way to toggle which repl to target?

@hkupty
Copy link
Member

hkupty commented Jul 14, 2017

It seems that some sort of session management is needed.. I've drafted a bit of this and a rudimentary implementation of 'sticky session' exists, while untested.

As soon as I have enough time to play with this, I'll come up with a long-lived branch that implements this behavior and make it available here for testing.

@hkupty
Copy link
Member

hkupty commented Apr 12, 2019

I've recently added sessions to the new lua version. I believe there might be still a few bits until full cljs support out of the box, but it should be possible already.

Does anyone mind guiding me to test this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants