This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-25
Channels
- # announcements (66)
- # aws (1)
- # beginners (60)
- # boot (6)
- # calva (80)
- # cider (3)
- # clj-kondo (14)
- # cljdoc (4)
- # cljs-dev (27)
- # clojure (65)
- # clojure-dev (24)
- # clojure-europe (13)
- # clojure-gamedev (3)
- # clojure-italy (3)
- # clojure-nl (21)
- # clojure-uk (35)
- # clojurescript (98)
- # cursive (25)
- # data-science (3)
- # datomic (10)
- # dirac (16)
- # duct (2)
- # events (2)
- # fulcro (39)
- # jobs-discuss (1)
- # malli (2)
- # other-languages (1)
- # pedestal (26)
- # re-frame (61)
- # reagent (1)
- # reitit (7)
- # shadow-cljs (230)
- # specter (1)
- # tools-deps (29)
- # vim (1)
- # yada (4)
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 bugthere is a ticket already I think for being unable to compare versions for the same library across different coordinate types
still a todo
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?
yes, this has not yet been implemented
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 https://clojure.atlassian.net/browse/TDEPS-56) 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 https://github.com/kkinnear/zprint/blob/master/doc/filter.md#appcds-version with echo
pbpaste | zprint
, it’s also compiled with GraalVM.
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
user=>
(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.
ah, may be this: https://ss64.com/ps/set-psdebug.html