This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-01
Channels
- # aleph (1)
- # announcements (2)
- # aws (3)
- # bangalore-clj (1)
- # beginners (136)
- # boot (3)
- # calva (89)
- # cider (44)
- # cljdoc (1)
- # cljs-dev (31)
- # clojure (101)
- # clojure-europe (3)
- # clojure-italy (52)
- # clojure-nl (7)
- # clojure-spec (12)
- # clojure-uk (34)
- # clojurescript (62)
- # community-development (46)
- # cursive (25)
- # datomic (6)
- # duct (26)
- # events (6)
- # figwheel-main (4)
- # fulcro (25)
- # graphql (2)
- # jackdaw (4)
- # jukebox (3)
- # kaocha (57)
- # leiningen (31)
- # off-topic (3)
- # onyx (4)
- # other-languages (22)
- # pathom (18)
- # re-frame (9)
- # reitit (3)
- # shadow-cljs (60)
- # spacemacs (9)
- # speculative (22)
- # sql (39)
- # tools-deps (45)
- # vim (37)
I noticed something quite strange
I've added another profile
:circleci [:test {:env {:environment "circleci"}}]
to simply override on env varialble in the profile circleci, and this never picks it up:
lein with-profile circleci test
and keeps on thinking that you passed the test
profile
however lein with-profile circleci db migrate
for example works perfectly fine and picks up my change
is there something special about the test command?
@andrea.crotti not 100% I follow what you’re trying but perhaps try doing lein with-profile +circleci test
Although I don’t have a strong reason to suspect that’s the problem if you are just thinking the :test
profile isn’t loading or something.
You can play around with lein with-profile circleci pprint
as well I believe to see things perhaps clearer
I tried +circleci and it's the same
@mikerod lein with-profile
works with any command, but not with test
which seems to force loading just the test profile
You can try pulling whatever environment stuff you want to alter out to a separate profile. And refer to that in circleci and if you want a default test to include it, just add it with a with-profile (can alias to make it less typing)
ok it is loading the circleci
profile as well
but
it's not overriding an :env
variable
so if I create .new env variable that's picked up
and with +circleci it's the same, so I guess overriding env variables just doesn't work
which probably makes sense I just have to find another way
So my thought is that you have a composite profile test+circleci and it may work fine on its own
yes but the content of :env
is not merged the way I thought it would
new config goes there but existing config doensn't get overridden
I already found another way though
so not a big deal
Just FYI most profile data in lein is merged just via a generic merging fn it has. Maps merge mostly the same as clj merge, but certain collection types have special merge-with semantics. Like vectors (sequentials ? I think) are concatenated and maps are “deep” merged I think. I can’t remember exactly without looking though.