Fork me on GitHub
#cursive
<
2019-06-28
>
cjmurphy00:06:04

When I was having trouble making an existing lein project into a 'deps.edn only' one I copied across the clojure-deps.xml file (in the .idea directory) from another project (that was a 'from scratch' deps.edn project).

1
onetom08:06:12

@cfleming maybe i have OCD and i just don't want to have things around which I don't need? or at least I think I don't need 🙂 also, what should i call that Clojure deps module? the default module, which is inherited from the directory name, just sounds too suitable... here is what happened, to understand how i got into this situation: a saw a friend manually looking up data on websites. it told him i can probably automate that, so i made a directory for the project, saved some curl output into some .html files. did some greping on it and saved those commands into some shell scripts. after that, to get more precise data extraction, i did some slicing and dicing in the browser dev tools. now i thought i should just do that same in node.js and im probably done. after an npm init -y; npm install cheerio suddenly my project is a nodejs project from intellij perspective, with some extract.js in the root. but i didn't really like the artificial jquery-like oop interface on top of the parsed html, so i said, let's just go all-in and do it from clojure with jsoup or something, so after an echo '{:deps {}}' >> deps.edn i was expecting to get some clojure repl somehow and that's when i asked here (after some googling and catching up on the cursive mailing list of course). it's very likely that i would want to continue this project by having a combination of js/clj/cljs. for me these intellij concepts of project and modules are still a huge overkill at this stage and feels like accidental complexity. most of what these project concepts provide could be deduced equally well by projectile in emacs for example, which i envy 🙂

cfleming09:06:18

@onetom For better or for worse, IntelliJ is project based, and projects require modules. I’m afraid you’ll just have to grit your teeth and ignore the module files 🙂

cfleming10:06:13

Re: the module name, currently you can’t change its name. Ideally the name would come from Deps, but it provides no way to name a lot of things.

jamescroft14:06:49

I'm trying out shadow-cljs on a project. I have the shadow-clj nrepl running (outside of cursive), and I have connected to it as a remote REPL from inside cursive. I can evaulate code from the editor (js/alert 1) and all works as expected. When I am in a test file I can load the current namespace into the repl and run (run-tests). The tests run and the output is logged to the REPL. The bit of functionality that I am missing is the test integration within the editor. If I select a test and run 'Run 'my-test' in REPL then I get an error in the REPL, the output is

Running tests in example.core-test
Calls to `require` must appear at the top-level. at line 1 cljs/user.cljs
Any pointers?

dnolen18:06:14

does the latest Cursive still auto-detect the kind of REPL you're running (cljs/clj) ?

dnolen18:06:15

it doesn't seem to be working for me