This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-06
Channels
- # adventofcode (99)
- # announcements (9)
- # aws (3)
- # babashka (22)
- # beginners (90)
- # boot (2)
- # calva (22)
- # cider (8)
- # clj-kondo (14)
- # cljsrn (20)
- # clojure (24)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (83)
- # clojure-spain (1)
- # clojure-spec (46)
- # clojure-uk (43)
- # clojuredesign-podcast (70)
- # clojurescript (40)
- # cursive (25)
- # datomic (9)
- # duct (3)
- # emacs (14)
- # figwheel-main (2)
- # fulcro (61)
- # graalvm (8)
- # juxt (7)
- # kaocha (2)
- # leiningen (19)
- # luminus (5)
- # malli (58)
- # off-topic (4)
- # re-frame (11)
- # reitit (5)
- # rewrite-clj (3)
- # shadow-cljs (63)
- # sql (5)
- # testing (5)
- # tools-deps (26)
- # uncomplicate (2)
- # vim (4)
Hey, I am having a problem with lein
When I run lein test
it works normally, but when I run lein with-profile ci-tests
, I get the error
Syntax error (IllegalAccessError) compiling at (clojure/tools/reader/edn.clj:1:1).
reader-error does not exist
This is the profile config:
:test {:resource-paths ["test/resources"]
:dependencies [[clj-http "3.10.0"]]}
:ci-tests {:test-paths ["ci-tests/resources"]
:dependencies [[clj-http "3.10.0"]]}
@aoellerer do you have any other profiles?
:dev {:resource-paths ["dev/resources"]
:source-paths ["dev"]
:dependencies [[org.clojure/tools.namespace "0.3.1"]
[clj-http "3.10.0"]]}}
Also I’m pretty sure the :test
profile is always going to be active during the test
task. So if you need stuff to not be included during ci-tests
then they should go to a non-special profile.
It seems as if you have to include [org.clojure/tools.reader "1.3.2"]
into the dependencies
@aoellerer you are transitively getting that dependency (`org.clojure/tools.reader`) from org.clojure/tools.namespace
most likely
if you have an explicit dependency on it, it’s correct for you to declare it directly instead of rely on org.clojure/tools.namespace
to bring it for you
lein ubejar
will not include default lein
profiles - intentionally it leaves out all profiles not specified except the “special” profile name uberjar
this is because the default profiles have things that shouldn’t be in your “production deployed artifacts”
and when you use with-profile
you take explicit control of what profiles are added - so again, the default lein
profiles do not get added
if you use with-profile +my-profile
that means to include my-profile
plus any other default profiles already active
lein uberjar
and lein jar
(which also affects lein install
)are a bit more aggressive though - they will remove default profiles and you have to instead use :leaky
metadata - but won’t get into that - not typically needed