Fork me on GitHub
#cursive
<
2018-07-19
>
cfleming03:07:40

Feedback very welcome, as always.

dhkl06:07:49

Just got the email. Super excited about this. Thanks Colin!

cfleming07:07:43

@dhkl Cool, let me know how it works for you!

cfleming09:07:12

@flowthing Do you get any details if you click on that?

flowthing09:07:31

No, unfortunately not. 😕

cfleming09:07:32

Or is there anything in your log? Help-&gt;Show log in Finder/Explorer

flowthing09:07:07

Yes there is, actually, just a sec...

cfleming09:07:50

@flowthing If you go to Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, is the path to ‘clojure’ command set correctly? Does it show a version below it?

flowthing09:07:59

Let's see...

flowthing09:07:04

The path is set correctly (it's set to /usr/local/bin/clojure and it works when I run it from the command line), but it says "Command timed out" below it.

flowthing09:07:50

❯ brew info clojure
clojure: stable 1.9.0.381

cfleming09:07:30

If you do clojure -Sdescribe on the command line, is it quick to return? The timeout is set to 5secs IIRC

flowthing09:07:46

It returns pretty much immediately

flowthing09:07:08

❯ time clojure -Sdescribe
{:version "1.9.0.381"
 :config-files ["/usr/local/Cellar/clojure/1.9.0.381/deps.edn" "/Users/eerohe/.clojure/deps.edn" ]
 :install-dir "/usr/local/Cellar/clojure/1.9.0.381"
 :config-dir "/Users/eerohe/.clojure"
 :cache-dir "/Users/eerohe/.clojure/.cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}
        0.03 real         0.01 user         0.01 sys

flowthing09:07:42

My deps.edn file is in its default state.

cfleming09:07:51

I wonder what’s going on there.

flowthing09:07:20

There are also some StackOverflow errors that mention Cursive namespaces/classes in the IDEA log, but I'm not sure whether they're related to this or something else.

cfleming09:07:36

I think they’re unrelated.

cfleming09:07:46

Does this happen for all projects?

flowthing09:07:19

I've tried multiple, yeah. I just created a new project that has just {:deps {org.clojure/core.cache {:mvn/version "0.7.1"}}} in the deps.edn file.

cfleming09:07:16

Hmm, actually I see the timeout is 1 sec, I remember bumping that up to 5 sec to make it work on my machine, but I don’t understand why it should take so long.

cfleming09:07:42

That change got lost in my various trials of how this should work looks like.

flowthing09:07:07

Ha! I found the issue.

flowthing09:07:16

It's not really related to Cursive.

flowthing09:07:02

For some reason, the Shell path setting under Tools > Terminal was borked. I set it to /usr/local/bin/bash and now it works.

cfleming09:07:39

That’s bizarre.

cfleming09:07:10

I’m using an IntelliJ utility class to execute that process, I never imagined it would use that setting.

flowthing09:07:39

Heh, that's weird. But it certainly seems to.

flowthing09:07:28

Well, sorry about the wild goose chase, but I guess something useful came out of this, at least.

cfleming09:07:40

Yes, absolutely. I’ll debug that tomorrow and see if I can figure out where that value is being used. If it does turn out to be important I’ll flag an error if what it points to doesn’t exist or isn’t an executable file.

cfleming09:07:23

But probably I’ll just execute that process another way - it shouldn’t require a full shell. I wonder if that’s why it took so long on my machine.

flowthing09:07:50

Anyway, thank you very much for deps.edn support! Seems to work great now that that got sorted out.

cfleming09:07:45

Great! Let me know if there are any other issues, I’ll get another build out soon fixing any issues people find.

cfleming09:07:55

@flowthing BTW are you on OSX?

cfleming09:07:16

Great, thanks.

p-himik11:07:31

Would it be possible to somehow resolve such requires? Or at least remove the highlighting for such statements.

p-himik11:07:06

I'm using shadow-cljs to make such imports work.

p-himik11:07:56

Maybe it would be possible to not mark anything as unresolved when the first item in a vector in :require in CLJS is a string?

p-himik11:07:07

(there shouldn't be :as in :refer on the image, but you get the idea)

kenny15:07:03

Is there a way to switch a Leiningen project to deps.edn?

kenny15:07:54

I switched the project by deleting the .idea and .iml file in my project, selecting "Import Project", selected my project folder, and then chose Deps. Not sure if there is an easier way to do that. Is there a way to specify aliases Cursive should use to resolve things?

gklijs19:07:18

What I sometime do is open the project from the project.clj file, opening from deps.edn probably works, and then choose recreate project or something like that.

kenny19:07:29

This does not work with deps.edn.

cfleming20:07:50

Hmm, that should work - I’ll try that and fix it if it doesn’t.

cfleming20:07:05

@kenny Do you get an error or something when you try that?

kenny21:07:38

@U0567Q30W The little banner that usually says "Add project" did not appear.

cfleming21:07:16

Oh, you mean that there wasn’t a menu item for that? Yes, I haven’t added that yet.

cfleming21:07:49

But if you close the project, then open it again using the deps.edn instead of the project.clj, I would hope that will work - I’ll test that today.

kenny22:07:49

@U0567Q30W Does open it using deps.edn mean clicking Open then selecting the actual deps.edn file in the file browser?

gfredericks21:07:58

is there a way to get cursive licenses to work with the intellij license server? caveat: I have no idea what any of that means

cfleming21:07:28

@gfredericks No, but I was waiting for someone to ask about it.

cfleming21:07:41

Is that something that would be desirable?

cfleming21:07:11

(the tl;dr is that you have your licences registered with a server that the IDE checks against, instead of mailing licence files around)

gfredericks21:07:13

modulo the above caveat, I believe so

gfredericks21:07:46

we already do our intellij licenses that way, and the cursive ones are manual and every year some sort of mystical process happens

cfleming21:07:41

Yeah, I have no idea how companies with lots of licences manage it. A few of them have written to me from time to time saying some variation on “we have a total mess internally, this is nuts”.

gfredericks21:07:58

but they never ask about the license server thingamabob?

cfleming21:07:11

There is a possibility that that might happen in the future, but I don’t know when (relies on JetBrains)

gfredericks21:07:05

does this mean you'll start the process and it'll just be blocked on them, or you'll wait for more users to ask for it?

cfleming21:07:50

It requires them to develop functionality, they were planning it for this year but I don’t know if that will happen. There’s also uncertainty about how it will work, i.e. migrating existing licences onto their system.

gfredericks21:07:06

roger; thanks

cfleming21:07:16

Strangely, no.

cfleming21:07:24

Literally no-one has ever asked me about that.

cfleming21:07:47

I even added a FAQ entry before I released in anticipation of the questions which never came 🙂

kenny22:07:03

Is there a way to specify aliases Cursive should use to resolve things?

cfleming22:07:53

No, currently it tries to add all source roots etc that it can. Is this for dependencies?

cfleming22:07:31

I guess this should work more or less like the lein integration, where you can choose which you want to use.

kenny22:07:54

Yes, this is for dependencies. I have dev deps that aren't resolved.

cfleming22:07:23

@kenny Ok, I’ll fix that for the next build.

❤️ 1
kenny22:07:59

BTW, how do you handle :override-deps?

kenny22:07:52

Or will aliases work like the lein integration, like you mentioned?

cfleming22:07:04

So, I don’t handle those, I just get dependencies back from t.d.a

cfleming22:07:27

I’ll have to pass the aliases to it though, or rather use the aliases to correctly construct the map I pass to it.

cfleming22:07:48

All the dependency resolution, overriding etc is handled by the lib.