-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Error starting CLJS REPL with Boot project #1881
Comments
Ok. So I'm looking into this.
This is the code in the callback function that begins the clojurescript repl. It gets the var You set a default value for how to conjure up a clojurescript repl, and I've never really liked this style. And here, we aren't using lein and we must know how to crank up a repl. Apparently the thing we want is from a library called I'm new to boot and cljs, but apparently the standard way to interact with this is to jack-in and then run |
If boot tasks can be counted on to always have a task called dev, we could determine that we are in a boot project and launch the dev task. Otherwise, if these tasks are arbitrarily named, I'm not sure how we could reliably launch anything with boot. |
And there's this from a boot library The cljs-repl-env task There is a cljs-repl-env task that doesn't start a new nREPL server which you can use via cider-jack-in. An example is shown below.
and I'm not totally sure how to interpret that |
I had a scheme that worked for this (with boot) back when I did a bit of cljs. I used the same library you're using. I'll try to dig it up. As for trying to be smart, the best we can do is have a separate variable for boot and let the user decide what code gets run. Cljs repls are way too numerous (and quite a bit of manual) for us to provide a catch all solution. That's why we wrote that original lein-cljs-repl variable. We people instructions on how we know it can work, but we can't promise it will fit into every ad-hoc method out there. |
I think @Malabarba is right - probably we need a |
I'm not sure that I really like the variables. With the current one for lein, I've run into issues. For instance, I set it to the one I most often use. I clone a project which uses a different repl type. My interaction isn't seamless. I try to use a directory local var but don't really know them that well. I like when it works smoothly but it seems to commit you to a certain type of repl for all projects. But I agree it works for the most part. Thoughts? |
Well, that's the Emacs way - you come up with some sensible defaults and use dir-local variables for projects that don't adhere to the defaults. I definitely don't want us to start inspecting the project files to figure out what would be the best way to start a cljs repl. |
Ran into this problem and I can work around it by using the following
Of course it would best to have a better name and |
On second read, it looks like the problem above is different, about the rename, the commit is this: 313a0df And probably we should add a clause for |
The problem with the template is exactly that it does not launch or even hints at My
|
If we wanted to be really fancy here, we could inject |
Actually, not solved, it is still calling the
|
…boot-cljs-repl` This patch firstly adds two more defcustoms, `cider-cljs-boot-repl` and `cider-cljs-gradle-repl`, that will be queried by the `cider-cljs-repl-form` function on `cider-jack-in-clojurescript` Secondly, it adds a clause in `cider--cljs-repl-types` that allows to automatically call `adzerk.boot-cljs-repl/start-repl` in case `boot` is the project type.
…boot-cljs-repl` This patch firstly adds two more defcustoms, `cider-cljs-boot-repl` and `cider-cljs-gradle-repl`, that will be queried by the `cider-cljs-repl-form` function on `cider-jack-in-clojurescript` Secondly, it adds a clause in `cider--cljs-repl-types` that allows to automatically call `adzerk.boot-cljs-repl/start-repl` in case `boot` is the project type.
…boot-cljs-repl` This patch firstly adds two more defcustoms, `cider-cljs-boot-repl` and `cider-cljs-gradle-repl`, that will be queried by the `cider-cljs-repl-form` function on `cider-jack-in-clojurescript` Secondly, it adds a clause in `cider--cljs-repl-types` that allows to automatically call `adzerk.boot-cljs-repl/start-repl` in case `boot` is the project type.
Expected behavior
I should get a working CLJS REPL when I run
cider-jack-in-clojurescript
.Actual behavior
I get this stack trace:
The REPL itself seems to sort of work, but any CIDER commands fail with a fresh exception.
Steps to reproduce the problem
boot -d seancorfield/boot-new new -t hoplon -n address-book
C-x C-f address-book/cljs/index.cljs.hl
M-x clojurescript-mode
(if it isn't set up to.cljs.hl
files already).C-c M-J
CIDER version information
Lein/Boot version
Boot 2.6.0
Emacs version
Emacs 25.5.1
Operating system
macOS 10.12.1 "Sierra"
The text was updated successfully, but these errors were encountered: