Fork me on GitHub
#cursive
<
2017-10-26
>
vikeri09:10:28

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.

mattford11:10:19

find-usages and lein checkouts

mattford11:10:00

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

mattford11:10:59

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

mattford11:10:53

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?

mattford11:10:01

(I'm a bit confused)

mattford12:10:36

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.

mattford12:10:57

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

mattford12:10:20

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

mattford12:10:22

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.

zylox16:10:58

@manutter51 mine isnt that dark, weird. might want to see if its something related to https://github.com/cursive-ide/cursive/issues/1594

zylox16:10:13

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

manutter5116:10:58

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

manutter5116:10:08

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

cfleming21:10:14

@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.

cfleming21:10:08

@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?

cfleming21:10:25

After changing the console colour settings, that is?

cfleming21:10:26

@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.

cfleming22:10:17

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

manutter5122:10:18

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

cfleming22:10:08

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

manutter5111:10:57

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

mnewhook22:10:01

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

mnewhook22:10:12

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

souenzzo02:10:53

+1 tô this feature