This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-11
Channels
- # announcements (1)
- # aws (3)
- # beginners (48)
- # calva (2)
- # cider (47)
- # clj-kondo (1)
- # cljs-dev (23)
- # cljsrn (10)
- # clojure (81)
- # clojure-chicago (4)
- # clojure-europe (3)
- # clojure-greece (4)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (6)
- # clojure-sanfrancisco (1)
- # clojure-seattle (1)
- # clojure-uk (21)
- # clojurescript (40)
- # core-async (82)
- # cursive (18)
- # datomic (6)
- # duct (11)
- # figwheel-main (4)
- # fulcro (26)
- # jobs-discuss (22)
- # leiningen (18)
- # off-topic (10)
- # pathom (3)
- # re-frame (5)
- # reagent (16)
- # reitit (4)
- # shadow-cljs (8)
- # specter (7)
- # sql (16)
- # tools-deps (58)
- # xtdb (30)
lately I'm getting
Full report at:
/var/folders/2m/h3cvrr1x4296p315vbk7m32c0000gp/T/clojure-6407140529537279679.edn
when I get an exception running a program with tools.deps. Is there a way to get the old behavior back?--report=stderr
I think
> file - write to a temp file (default, falls back to stderr) when would this "fall back to stderr" as a default?
This doesn't work for me:
clj --report stderr -A:clj-kondo --lint corpus/unresolved_symbol.clj
maybe try with -A:clj-kondo
in the end?
> Specifically, the default behavior for error reporting with Clojure 1.10.1-beta3 is to write the error report and stack trace to a file, but you can also change that to stderr via system property -Dclojure.main.report=stderr if you prefer.
seems reasonable
If I copy jar to .m2
and add it to deps.edn
- it works
mkdir -p ~/.m2/repository/athena/athena-jdbc/2.0.7/
wget -O ~/.m2/repository/athena/athena-jdbc/2.0.7/athena-jdbc-2.0.7.jar
:deps {athena/athena-jdbc {:mvn/version "2.0.7"}
but if I add it via local/root
- tools.deps
starts to complain about wrong data in pom
:deps {athena/athena-jdbc {:local/root “lib/athena-jdbc.jar”}
why is such difference? is there a way to add jar as from .m2
but from within the project?if you get an error, can you post it in a snippet (COMMAND-SHIFT-ENTER) @kirill.salykin
yes, one moment
when tools.deps uses a local jar with :local/root
&& the jar contains an internal pom.xml, it will try to read the pom and fetch dependencies
shall I remove all poms?
and why it doesnt try to do it when reading from .m2
?
it will try to read the pom in .m2 - but not the pom within the jar, the one next to the jar if present
there is no pom with the jar
But anyways, if it goes through the .m2 path that's a different handler entirely -- uses Maven Resolver
only this published by aws
thanks
does it make sense to add some flag to force tools.deps not try to fetch deps defined in pom? what do you think?
eg
{:deps {jdbc {:local/root "...", :ignore-pom? true}}}
of course, just a little proposal
thanks a lot for help
Can you specify the JAR in :paths
and not worry about dependency resolution?
Oh, I ll try, thanks!
If you’re using a jar, that has transitive dependencies, how else are you going to satisfy those deps?
most of them don't have transitive deps @alexmiller -- the usecase is usually downloading some database driver that is self-contained in the jar
yes, tools.deps purpose is to build out transitive deps, and it will do so with local jars as well. The no deps case is kind of the base case and it doesn’t matter
Thanks for clarification