Fork me on GitHub

Forgive my limited REPL knowledge but I have a question. I’m running a Cursive REPL with the clojure.main option, a parameter (to a startup .clj file) and a working dir specified. How can I run this same setup without Cursive? The main issue I have is how the “Working dir” option can be specified either using lein run or java -cp clojure... or whatever correct way of doing it is. I’m trying to get this setup to work for an emacs user.


find-usages and lein checkouts


I see odd behaviour: in the module of the library it can't find any usages in the module that depends on it.


It does work the other way though, the client module can find the refs in the library module


Also, I'm new to cursive, but do people edit the source in the lein checkout folder or via the module in the project list? What's best practice there?


(I'm a bit confused)


so more find-usage stuff, in the checkouts folder I dont' get the ability to alter the scope of the search when using it on the upstream library.


oh please ignore me - it was finding the jar and not the snapshot version of my upstream library


after that was sorted the checkout module find-usage worked great


took me too long to work out though 😞

Alex Miller (Clojure team)14:10:20

@cfleming just want to say thanks for the debugger support in Cursive. :) Currently debugging a gnarly Clojure -> Java thing (inside the bowels of Maven code). Without the debugger, this would be 100x harder to understand.


@manutter51 mine isnt that dark, weird. might want to see if its something related to


on a side note i think it uses console color settings but im not in a position to test that at the moment.


Yeah, I changed the console color, but it’s not picking up in the repl


That issue does look like what I’m seeing tho.


@vikeri The easiest way would be to cd into the working directory, and then use java -cp clojure.... If the working dir is non-standard (i.e. not your main project directory or something) then the easiest thing would be to write a short shell script to do the two things.


@manutter51 I actually think your issue might be different to #1594. That one actually looks like the exception is coming from aviso/pretty, which uses ANSI colours. Yours definitely should be affected by the console colour scheme though. Does restarting your REPL help?


After changing the console colour settings, that is?


@alexmiller Great, I’m glad it’s helpful! That’s definitely the ideal use case for it. I’m actually planning a bunch of fixes to the debugger soon, hopefully it’ll be faster and fix some unreliability of the breakpoints.


@manutter51 Actually, I think your problem has the same root cause - I’ll fix that.


@cfleming Thanks for looking into this. It’s not picking up the console color even after restarting the REPL.


@manutter51 Ok, you’ll probably have to restart IntelliJ then - sorry about that. I’ll fix it for the next build.


Ah, restarting IntelliJ did work, it’s using the console colors now. Tks much!


is there an easy way to add debug prints to a lein dependency?


ie: I want to a some prints to a defn in a dependent package


+1 tô this feature