Fork me on GitHub

@vincent.cantin There is a plan to investigate it, yes. There are some interesting implications, because REBL has the GUI in the actual REPL process, whereas with Cursive the GUI is in an external process (IntelliJ itself). I still don’t know what the full implications of that are, so no promises.

👌 5

@kenny I’m testing the git lib missing SHA fix. However I can’t reproduce what you’re seeing - for me, if the SHA is invalid, then when I refresh the project the Build toolwindow pops up with a pretty clear message. Is there some other circumstance when that’s less visible?


Yes. When using auto-import, it does not pop open the Build window.


@kenny I’ve investigated this, and I can’t see a way to fix it. Errors are deliberately suppressed for auto-import refreshes, presumably because errors are common while you’re editing build files. I can’t see a way to modify that behaviour.


The best workaround I can suggest is to manually refresh after changing SHAs, which does show the error.


Or just manually check the Build tab, I guess.


Oh right, you wouldn't want to message the user while they are editing it. I hit this case all the time though -- I accidentally copy a SHA from the wrong repo or forgot to push a SHA -- and the results are confusing. Perhaps a better solution would be if you try and start a REPL after the refresh and the build failed, alert the user.


Doesn’t that already happen when the build fails?


I guess for most people, starting the REPL doesn’t actually build anything…


Not sure. Lemme check.


No it does not tell me. This is what I do: 1. Start with a valid git SHA 2. Change the SHA to an invalid one 3. Hit save & wait for the auto import to finish 4. Hit REPL play button 5. No error


Right. I’m not sure at which point there Cursive could realistically detect and show an error.


Even printing a message in the actual REPL that the classpath is "stale" or does not match the classpath in deps.edn


But hold on - when you start the REPL in step 4, do you still get the previous classpath?


Ok, so that is a bug I can definitely fix.


What should happen?


Once you’ve updated deps.edn, if you run a REPL from a Run Config that uses that deps.edn it should definitely use the new one.


And what should happen if the deps.edn is not valid?


That will depend on what deps does, but I think it should show an error.


One sec, let me try this with my test project.


@kenny I can’t reproduce that. Here’s what I’m doing: 1. Create a deps project with a git dep with a valid SHA. Then sync it etc. 2. Running a REPL with this works fine. 3. Modify SHA to be invalid, press save, check in Build toolwindow that message appears. 4. Run REPL again, and I get an error Error creating Run Parameters, and a message in the Run toolwindow about the SHA.


I just fixed a bug where the message about the SHA in step 4 occasionally wouldn’t be shown, but under normal circumstances it would.


I've never seen that message.


Let me try this with the current published version, in case the version I’m running has something fixed that’s affecting this.


Hi, I'm trying to create a deps.edn project and got the error 'Cannot execute: Clojure command not configured'. I installed Clojure using brew on mac and the clojure command is in my PATH. Is there another PATH I have to set up in IntelliJ?


Nevermind, I went to the 'Clojure Deps' settings, made a change to use 'toolds.deps' and then back to 'CLI' tools and I didn't get the error anymore.


Hi - I sent something to the mailing list, but I wonder if this would be a better place for it: is it possible the Organize Imports function will ever work. I would love Cursive to clean up my :requires and :imports


I'm gonna extract the clean-ns op from for easy, editor-agnostic usage pretty soon. Keep an eye on #announcements ... maybe in a couple weeks?

parrot 5

I always wondered why "refactors" were tied to a specific editor, rather than being a framework that any editor could plug into

👍 5

luckily refactor-nrepl is agnostic. but IIRC it still needs to talk over the nrepl protocol. I want to make it easier - just one fn call away from your repl


Hi, I wonder if anybody had any trouble with Cursive v1.8.1-eap2-2018.3, tools.deps and Clojure 1.10.0.?

Alex Miller (Clojure team)21:02:56

perhaps you could explain what trouble you’re seeing?


Sure. Let’me grab the details here


clj -A:main
runs just fine from the shell. (using clojure 1.9.0 in deps) However from Cursive, I do get: Exception in thread “main” -m red-robin.main (No such file or directory) when using from within Cursive


I do have clojure 1.10 installed via brew

Alex Miller (Clojure team)22:02:53

does your deps.edn :paths match the root of your source?


This is my deps.edn

  {:extra-paths ["src"]
   :main-opts ["-m red-robin.main"]}


Same structure on Cursive


Cursive debug config


I wonder if this is related to have clojure 1.9.0 in tools.deps, but also having clojure 1.10 installed by brew :thinking_face: I even tried to downgrade clojure to 1.9.0 but could not using brew.

Alex Miller (Clojure team)22:02:52

that shouldn’t matter at all

👍 5
Alex Miller (Clojure team)22:02:22

any brew installation should work with any Clojure version


Using brew, I can only install 1.10. Could not figure out how to install 1.9 after 1.10 was released.


My project currently does not run on 1.10

Call to clojure.core/ns did not conform to spec.
But I will investigate that later.


After upgrading to 1.10, Cursive stopped working, that is why I suspected a relation. But I think Cursive also upgraded, so now I am not sure what was the cause.

Alex Miller (Clojure team)22:02:59

you can use something like brew switch clojure to switch to a different (older or newer) version


I have tried that, but got

Error: clojure does not have a version "" in the Cellar.


The only 1.9.0 that I have was installed by Cursive through maven

Alex Miller (Clojure team)22:02:17

well, it has to be a version you’ve installed in the past - brew info clojure

Alex Miller (Clojure team)22:02:39

I don’t think Cursive does anything with brew. you may be confusing two different things here

Alex Miller (Clojure team)22:02:11

Maven is used to download versions of the clojure jar (the language itself) - those versions are usually like 1.9.0 or 1.10.0


I know. What I am saying is that on brew I can only get clojure 1.10

$ brew info clojure
clojure: stable
The Clojure Programming Language

/usr/local/Cellar/clojure/ (9 files, 21.1MB) *
  Built from source on 2019-02-11 at 10:58:02
==> Dependencies
Required: rlwrap ✔
==> Requirements
Required: java >= 1.8 ✔
==> Analytics
install: 2,988 (30 days), 12,022 (90 days), 41,661 (365 days)
install_on_request: 2,949 (30 days), 11,821 (90 days), 40,716 (365 days)
build_error: 0 (30 days)

Alex Miller (Clojure team)22:02:43

brew is used to install a version of the clojure and clj tools which have versions like or


But in my deps.edn I have org.clojure/clojure {:mvn/version “1.9.0”}

Alex Miller (Clojure team)22:02:28

the tools are the things that let you run clojure or clj at the terminal


Got it. I saw the source for the bash scripts.

Alex Miller (Clojure team)22:02:05

many tools (clj, lein, boot, Cursive, etc) may cause the Clojure jar to get downloaded and cached in the Maven repository

Alex Miller (Clojure team)22:02:35

that error you posted before (Call to clojure.core/ns did not conform to spec.) will prevent a namespace from loading, so is likely to be a problem for you


That only happens when I change deps.edn from 1.9.0 to 1.10


I will try to go deeper into what Cursive is trying to run, to check out why 1.9.0 is failing.


Interesting. From the shell, both versions below do work

clj -m red-robin.main
clj -A:main
From Intellij, it breaks on:
Clojure 1.9.0
nREPL server started on port 64956 on host
Exception in thread "main" -m red-robin.main (No such file or directory)
	at Method)
	at clojure.main.main(
Because it is passing “-m red-robin.main”from deps.edn straight to:
public static void main(String[] args) {


Found a clue. The difference between Intellij and tools.deps from cmd line is:

-javaagent:/Applications/IntelliJ IDEA  IDEA 
Without it, it just works.


That only means that Cursive is assembling the classpath just right, and invoking

clojure.main -m red-robin.main
as expected