Fork me on GitHub

Hi all I have a gradle project (mainly java code), in which I have some Clojure libraries as dependencies. There is no clojure build-tooling - I only have an nrepl instance through which I live-code. The problem is that cursive doesn’t seem to locate the clojure-libraries source-code, so I am unable to use normal IDE functions (like source-code navigation, refactoring etc.) The clojure library dependencies appear fine in the gradle dependencies window, and even clojure code evaluation in the nrepl works. Is there a way to hint to the Cursive editor how to integrate with the libraries already on the classpath?


That should just happen if the libraries are attached to your project correctly. Just to be clear, things are working for your own source in the project, correct?


Thanks for the response and the nudge @U0567Q30W - since you say it should work, I tried a change to my dependencies to see if it affects - instead of developmentOnly I changed the clojure libraries dependencies to implementation and the problem went away. I wouldn’t have imagined that by myself as being a reason, but now that it does seem to affect, I am exploring more on how to go further. (For background: this is a springboot app and I am experimenting with introducing clojure here but keep it dev-only initially)


Hmm, my gradle-fu isn’t strong enough to know what might be happening there, sorry.


Not a problem! Your input helped - I don’t mind using implementation in the mean while!


I was curious why my deps.edn GIT repos suddenly didn’t work and experimented with reloading the project. I wanted to preserve my REPL configurations so I saved them as a file in .run. Then when I found out that I needed to upgrade to the EAP to get that functionality back, I looked for an option to re-import those REPL configurations, couldn’t find one, and then I went with some general “import settings” option in intellij. Now my whole editor has been reset. Despite syncing my intellij settings to a git repo automatically, overwriting local settings from the repo state seems to do nothing. Fucking sucks. Guess I’ll be setting up intellij and cursive from scratch this morning.


Sorry about that - how did you export the .run file?


There is a checkbox in the run configurations (upper right corner) for each run configuration. Clicking that saves an XML file to /.run


Do you mean the “Store as project file” one?


That will normally store them under <project>/.idea/runConfigurations


Unless you have that customised? I didn’t know that was a thing, I think that must be relatively recent.


From a (now fresh) install of Intellij


Yep, I see. And you still have those run config files?


yeah, do you want me to send them to you?


Or are the run configs now not the problem, and it’s more that all your config is lost?


No, I’m just trying to figure out how to get those back.


That all of my configuration, all of the plugins installed, everything apparently reset


That is very strange.


Yup… it was very unexpected


Import Settings would normally accept a jar file created at some point from an export. It should (in theory) only overwrite the config that’s actually present in the jar.


Apparently there is some undefined behaviour :S


That said, there’s plenty about IntelliJ I still don’t understand, but that definitely does not sound like expected behaviour.


Anyway, thanks for getting back to me. I’m using Cursive free of charge at the moment, so I shouldn’t be complaining.


So normally, when you tick that option, the files are stored within .idea, and the IDE should pick them up. However, I don’t know how that works when that location has been customised. In the new copy of your project, if you customise that location then close the project and reopen it, does it find them?


Free users deserve support too 🙂

🙏 6

I did convert a bunch of people at my old workplace from poor emacs setups to Cursive which resulted in additional licence purchases :P


We need some sort of preacher or messiah emoji.

💯 2

> So normally, when you tick that option, the files are stored within `.idea`, and the IDE should pick them up. However, I don’t know how that works when that location has been customised. In the new copy of your project, if you customise that location then close the project and reopen it, does it find them? Right now the issue is that all of my intellj settings were nuked, keybindings, plugins, everything, so I really can’t check this stuff at the moment


not just the project specific settings. I makes little sense to me why this would happen.


No recent projects either… everything is gone


That is really weird, I’ve never heard of anything like that. Unfortunately, I think you’re right that reinstalling is your only option. Once your IDE is moderately sane and you have your project back, with a bit of luck IntelliJ will pick the run configs back up.


Ok, reinstalled Cursive EAP, managed to restore my keybindings (I think), so the damage was controllable


but I’ll manually restore the REPL run configurations this time, not risking anything


Nice, I’m glad to hear it!


I encountered this while refactoring some code; the second cursor is typing in reverse 🤯

🙃 8

Currently on 1.10.2-2021.1 btw

Jeff Evans19:09:49

Just noticed that my license expired, and it got me thinking back to when I first purchased the Cursive license a year ago. I was going through a rough time, professionally and personally. Probably strange to say, but using Cursive felt like the one thing that was just “working” at the time, even though I ran into occasional (literal) bugs and glitches. I was already extremely comfortable with IntelliJ, so it allowed me to learn Clojure with a minimal amount of extra cognitive overhead. Now, I have a terrific full time job writing Clojure (in Cursive, obviously). It’s a fantastic tool, and the fact that the developer is here in Slack answering questions is an almost ridiculous bonus. Keep up the great work (and take my money for the renewal).

☝️ 6
💯 18
clojure-spin 2

Thanks for the kind words, Jeff! I enjoy developing tooling because I like helping make people’s work more pleasant, it’s always great to hear that that’s the case.


I’m having trouble with project resolution at the moment. Something about 401 unauthorized error. I can’t replicate this in the cli, so I was wondering if and where log files would be stored for that?


Ah, found the problem. Would be useful to have logging to help trace stuff like this down still though.


What was the problem, out of curiosity?


I’m setting up a new laptop and downloaded dev-local deps. Turns out I downloaded a newer version, so the version my repo wanted wasn’t in my mvn folder. Not exactly sure how that causes a 401, but :man-shrugging: .


What’s weird is that it worked on the CLI - is that correct?


It’s slightly more complicated. I made an :override-deps alias in my global deps, and was using it on the cli without selecting it in the cursive aliases. Should’ve caught it.


Ah, ok, that makes sense. What sort of logging would have helped, do you think?


If I run the cli with the wrong dev-local dep intentionally, it says the error is “failed to read artifact descriptor for com.diatomic:dev-local ....”. Along with the mvn stack trace. Would be nice to be able to see that in the logs.


The IJ / Cursive log for the error only prints the reason phrase “Unauthorized (401)”


Ok, I’ll repro that and see what I can do, thanks.

👍 2

*event log


If there’s anything in the log, it’ll be in the file at Help -&gt; Show log in Finder/Explorer, but it would be nice to surface that in the IDE too.