Fork me on GitHub

The aliases folder in Clojure Deps appears to have gone away in 1.8.2-eap5-2019.2.


Or am I crazy? It doesn't seem to be there...


I think it's usually under the project name. I updated to 2019.2 on Ubuntu. This is a multi-module project.


I tried specifying the aliases in the run configurations but all that does is pop open a Run window that says "java/sql/Timestamp".


@kenny Thanks, will check - 2019.2 has been a bit of a disaster for deps support, sorry.


When I require the amazonica library in the repl, all of its functions are defined and I can autocomplete them. When I require in a standard clojure file they don't autocomplete. Can I standard clojure files to autocomplete like in the repl somehow?


Got the same "java/sql/Timestamp" error on Leiningen project


@caleb.macdonaldblack Did you get a prompt to create stubs for your project?


@tap can you send a screenshot of that?


@tap Thanks, which JDK are you using to run IntelliJ?


Interesting. I didn't realize I'm on java 11 for IntelliJ.


Will try with "2019.2 for macOS with Bundled JBR 8 (dmg)". Maybe it fixes the issue because my project is developing against java8.


Quick question: assume I have a clojure script on disk as somefile.clj, it has no deps, and I don't want to create a project or a deps.edn as there are no dependencies and I would like to work in an ad-hoc manner by just opening the ifle. Is there a way to work with this file in cursive using a repl or am I forced to create a project?


Just creating a "bare" clojure project and trying to send the file contents to a repl results in "Cannot load file into the active repl. It is not in scope for the module used to start the repl"


or rather let me clarify, I would like to leave the file where it is and not set up a project structure with src etc, this is for ad how scripting to do stuff on the command line from clojure


Unfortunately IntelliJ doesn’t really work this way, it’s fundamentally project-focused.


Yeah, now that I had time to mull things over, I think I might have asked this question before. Thanks for the reply. It’s a bit of a shame, I find myself quite often in an ad hoc situation where I just want to fire up an editor from the command line, run some repl stuff, save a file and breeze to the next thing. Anyway, thanks for the reply and thanks for Cursive, it is still the best clojure editor out there and is making my life easier on a daily basis.


Thanks for the kind words! Yes, it’s occasionally a pain, but it’s unfortunately just what IntelliJ is.


Hey guys, I think I've missed a setup step here, but I'm not sure how to fix it/what step I missed. (It's entirely possible there is actually something wrong with the code.) I keep getting "cannot find source class for" (This generated by intellij/cursive debugger) How can I inspect my maps in the debugger? Or is there not a way to do so with Cursive?


In my REPL output while debugging: Error updating class definitions: NullPointerException java.util.concurrent.ConcurrentHashMap.get (


maybe it's related to this? take a look at your Project Structure | Platform Settings | SDKs and Project Settings | Project SDK.


I bow before your google-fu! More seriously, that does seem to have resolved the issue. I think maybe that setting got reverted when I did a separate install of intellij 2019.1.3


(since cursive release plugin isn't compatible with 2019.2


lol, those are great.


Separately, why does the debugger have 2 calls to functions? One normal and one as a static invoke? Is this a result of java needing everything to be in classes?


you're right, every single function in clojure is implemented as an individual java class. what you're seeing in the debugger is the spilling of the implementation details. there's a jira ticket to help mitigate this:


ok, thought that was probably the case. ty for your help again


The root cause of this is tangentially discussed in that issue, but the problem is this: when compiling a Clojure function call, normally the function is implemented in a static method, and then the IFn is stored in a var. So the call goes: 1. Load IFn from var. 2. Call IFn, which calls static method. Those are the two steps you have to step through. I’m hoping to fix the debugger so this is not required.


Awesome, thanks!


Just to report back, I don't find my "java/sql/Timestamp" error on leiningen project issue on IntelliJ with java 8 bundled.


Awesome, thanks for letting me know.


@cfleming so, this not a cursive issue, right?


oh turns out that upgrading to s3-wagon-private “1.3.2” (from 1.3.1) fixes this as well


@U5CV9L3QV Well, sort of. The issue is that Cursive resolves lein projects in-process, so it always uses the JVM used to run IntelliJ itself. This is becoming more of a problem as we move on from Java 8 since later JVMs are more restrictive (modules etc)


Later versions of things like lein plugins will probably have fixes for these problems (like s3-wagon-private)


gotcha! thanks for the clarification


and thanks for Cursive! i am huge fan


Great! Glad it’s working well for you.


To those who experienced the NPE with deps under 2019.2, was that during project import or refreshing an existing project? Jetbrains over at have suggested that a reimport might fix it.


i just got an NPE while re-importing an existing deps.edn project:


Yeah, I only got that message when trying to import an existing deps.edn file. The only reason I tried that was because Cursive wasn't working at all for me on the existing one.


in my case, simply opening (not importing) an existing deps.edn project doesn’t throw that NPE but symbols are still unresolved which, i think, is a different issue.


Yeah, same thing happens here


Ok, I’ll comment on the issue over there.


Hey! Cursive plugin updated so I can use release version of intellij! Yay!


How do I fix broken require statements? I have some methods which intellij can't resolve (thrown? for example)


This is not an actual clojure function and is (probably) only used in conjunction with clojure.test. There's an issue for the clojure.test integration not resolving those symbols though:


ah, fair enough then. thanks


Agh. I can’t remember how to fix this — reaching out for help, after spending a half hour on this… I’m trying to start a REPL in a project using lein and deps.edn. I’m getting this error:

16:28	Error reading /Users/genekim/src.local/gphotos1/project.clj
			Cannot run program "clojure" (in directory "/Users/genekim/src.local/gphotos1"): error=2, No such file or directory
			error=2, No such file or directory
I thought it was an issue with lein-deps-edn, and I think I even had this problem before. Somehow I fixed it before, I think after having stumbled upon this before: I upgraded to latest IntelliJ, thinking that was how I fixed it, but that doesn’t work. lein repl from command line works. In the REPL config screen, I see this error at the bottom, too.
Run Configuration Error: No Leiningen modules containing clojure.main found
Does anyone know how to fix this? Thank you in advance!!!


Here’s my minimal project.clj file:

(defproject gphotos1 "0.1.0-SNAPSHOT"
  :min-lein-version "2.0.0"
  :plugins [[lein-ring "0.12.5"]
            [lein-tools-deps "0.4.5"]]
  :middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
  :lein-tools-deps/config {:config-files [:install :user :project]}
  :ring {:handler gphotos1.handler/app}
  {:dev {:dependencies [[ring/ring-mock "0.3.2"]]}
   :uberjar {:aot :all}}
  :uberjar-name "google-photos.jar"
  :main gphotos1.handler)


@U6VPZS1EK So, I’m not sure about this. The clojure.main message just means that your project hasn’t synced correctly, so Clojure is not attached as a dependency. The root cause is the earlier issue. It looks to me like you need to specify the full path to the clojure command explicitly to lein-tools-deps, maybe? I’m not sure.


Thanks, @cfleming — I’m sitting down to try again!


Fixed, @cfleming! You were right — adding this fixed the problem! Thank you!

:lein-tools-deps/config {
                           :config-files [:install :user :project]
                           :clojure-executables ["/usr/local/bin/clojure"]}


@U6VPZS1EK It’s a bit ugly, sorry 😞. This is due to the fact that Cursive resolves lein projects in-process, so the CWD is wrong. I do a bunch of black magic to hide that fact, but it doesn’t work for everything.


Hey, I think Cursive and Clojure are freaking magical — like, a genuine technical marvel and miracle. You’ll never hear me complain about it!!! Thanks for all your great work, @cfleming!!! (And if I had to learn Emacs, I would have thrown in the towel long ago. :)


Hmm. Adding the lein-tools-deps {:clojure-executables} causes a problem you push to Heroku, as Heroku installs the Clojure binary in /app/.heroku/clj/bin/clojure during runtime, but a temporary directory during build-time (e.g. /tmp/build_cbd87f5c06a1f53ce752790e2642e2a0/.heroku/ — presumably, this is in PATH environment variable. For now, I’ll just comment it out on laptop… Or use @U04VDQDDY suggestion of opening IntelliJ in the terminal window… But it does seem like getting a config that works for Cursive and lein-deps-edn for laptop and Heroku isn’t possible right now… (Sorry, just trying to organize my thoughts. Maybe I’ll file this as a new issue in lein-deps-edn. This person was having similar problems: