Fork me on GitHub
#cursive
<
2019-01-30
>
astrashe01:01:29

I’m trying to import a shadow-cljs project that uses deps.edn, but I’m getting a “sync failed” message. I’m not sure what’s wrong, or what to do next.

cfleming02:01:01

@astrashe Can you send a screenshot of that error?

astrashe02:01:05

@cfleming Here you go, thanks

astrashe02:01:39

“sync failed” message

astrashe02:01:34

Could you see the file? I got a message from slack that says the workspace doesn’t have any space left

cfleming02:01:43

@astrashe Interesting, I wonder if it’s just taking a long time to sync all the deps. If you do e.g. clj -Spath on the command line and then try again in Cursive, does that help?

cfleming02:01:53

Yes, I can - Slack complains, but it does show the files.

astrashe02:01:01

clj -Spath didn’t work. The error comes back immediately — I think I’ve probably got something big misconfigured.

cfleming02:01:22

@astrashe Can you send a screenshot of Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps?

astrashe02:01:49

I think I didn’t have a clojure command specified — I put in the path, and it seems to be working

cfleming02:01:33

@astrashe Great! Which version of Cursive are you using, BTW?

cfleming02:01:37

@astrashe Ok, thanks - the latest EAP version should have better validation for that case.

astrashe02:01:23

I’ll check it out. Thanks again, it’s incredible that you’re here to help at this time of the night!

cfleming03:01:27

Hehe, it’s 4pm here 🙂

grav07:01:04

On latest EAP I get "Please Refresh to see available tools.deps versions" when trying to import a Module from a deps.edn

grav07:01:27

Doesn't matter if I select "Use CLI tools" or "Use tools.deps directly"

grav07:01:00

I've also tried "Refresh", thereafter "Download", but doesn't seem to make a difference

grav07:01:17

IDEA 2018.3.2

cfleming07:01:16

@grav Can you try configuring that first at Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, then retrying the import? Someone reported something similar the other day.

flowthing09:01:25

If I make some changes to a source file, then execute the clojure.tools.namespace.repl/refresh function, and then run the "Run tests in current NS in REPL" command, I get an error like this:

Alias handler already exists in namespace foo.handler-test, aliasing foo.handler
I have to do something like (ns-unalias *ns* 'handler) for every namespace required in the test namespace to fix the error. I understand why it happens, but I wonder whether there's an easier way to fix the issue?

jaime08:05:29

Sorry for necroposting 😅 @cfleming Any idea why this happens and how to resolve it? I'm also getting that issue. BTW, thanks for adding the show diff KB shortcut in tests 🔥

flowthing08:05:13

I avoid tools.namespace.repl these days (and don't use Cursive any more), but a couple of ideas come to mind: • I wonder if adding your test dir into t.n.r. refresh dirs would fix the issue? • If all else fails, you can add a custom Cursive REPL command that does (run! #(ns-unalias *ns* (first %)) (ns-aliases *ns*)), then run the tests again.

jaime09:05:46

Hi @flowthing, thanks a lot for the suggestion, seems like adding the test dir works. Let's see if I'll hit the issue again. 🙏

scarytom19:01:37

Any suggestions @cfleming?

Peter Wilkins23:01:55

does anyone use Cursive with Arcadia? there is a socket and a basic nrepl: https://github.com/arcadia-unity/Arcadia/wiki/REPL#editor-integration I had a punt at connecting with remote repl but got TypeNotFoundException: Unable to find type: cursive.repl.runtime I'm happy to work on this if anyone has any pointers that can help me get started.