Fork me on GitHub

can I specify a src folder for a local/root with a pom.xml (it's a boot project)


somehow the source path doesn't show up in the pom.xml and when I run clojure -Spath it returns src/main/clojure


the library is called dre.common and this is on my classpath: /Users/borkdude/dre/DocSearch/common/src/main/clojure


Adding "../common/src" to the extra-paths works, but not sure if that's the right way


I have some problem trying to reposition library coordinates: Library A’s deps.edn file

{:deps {B {:mvn/version "1"}}}
Library B’s deps.edn file
{:deps {C {:mvn/version "1"}}}
Library C’s deps.edn file
{:deps {}}
All version exists and can be resolved Then I want to use git version of C library in A Updated deps.edn for lib A:
{:deps {B {:mvn/version "1"}
        C {:git/url ""
           :sha "commit-sha"}}}
I’m expecting git version to take precedence in resolved dependency tree. Instead I got an error: Error building classpath. Unable to compare versions for C: {:mvn/version "1", :deps/manifest :mvn} and {:git/url "", :sha "commit-sha", :deps/manifest :deps, :deps/root "/home/user/.gitlibs/libs/C/commit-sha"} Looks like a bug in clojure-cli for me. Happy to file a ticket if anybody can confirm (or agree) that this is a bug

Alex Miller (Clojure team)12:10:39

there is a ticket already I think for being unable to compare versions for the same library across different coordinate types

Alex Miller (Clojure team)12:10:17

I have not read the above carefully, just going by the error


To summarize all above: main problem that I’m trying to override dependency coordinate by adding it in top-level dep.edn. That is working fine within the same coordinate type (maven and git) but fails when I need git dependency to overtake maven. So yes, I think adding ability to compare different coordinate types should solve it


Hi @U04V4KLKC, were you able to find a work around for this?

Alex Miller (Clojure team)12:10:47

yes, this has not yet been implemented

Alex Miller (Clojure team)12:10:58

although I've thought about it a lot and know what to do


nice! thanks


also I’m happy to help if you don’t mind to share you ideas around it


Not sure if it’s of any interest to anybody, but I’ve this small one-liner which pretty-print an EDN form in the clipboard:

clojure -Sdeps '{:deps {mvxcvi/puget {:mvn/version "1.2.0"}}}' -e "(require '[puget.printer :as puget]) (puget/cprint (read-string (first *command-line-args*)))"  $(mktemp) "$(pbpaste)"
I’m not sure why the first arg needs to be a file since I’m using the -e option (maybe but well, it works.


@U050S183X if you're interested in a tool with milliseconds startup time:

$ jet --pretty <<< "$(pbpaste)"
{:a 1, :b 2, :c 3}


Nice ! Is there an option for color highlighting, as this is why I’m using the command above ? For speed, I use with echo pbpaste | zprint, it’s also compiled with GraalVM.


jet doesn't have colors yet.


Is there some kind of option to clj/clojure commands to cause them to show the java commands they execute?


bash -x clojure <args>


(that shows "everything" but it does show the java command as well 🙂 )


bash -x clojure
+ exec /usr/bin/java -Dclojure.libfile=.cpcache/1562564545.libs -classpath src:/Users/sean/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/sean/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/sean/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar clojure.main
Clojure 1.10.1


(you can't do bash -x clj ... because it doesn't pass -x into clojure when it runs it via rlwrap)


Huh, didn't know about -x option to bash. Looks generally useful for all bash scripts.


Yeah, I use it a lot for debugging scripts.


I mean, I knew about the set -x command by editing my own bash scripts to debug them, and sometimes did that on things owned by root if I had the permission, but nice that it can also be done without editing the script.


is there something comparable for powershell?