This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-13
Channels
- # admin-announcements (208)
- # beginners (53)
- # boot (46)
- # cider (10)
- # cljs-dev (26)
- # cljsjs (10)
- # clojure (66)
- # clojure-dev (3)
- # clojure-russia (14)
- # clojurecup (5)
- # clojurescript (302)
- # cursive (22)
- # data-science (1)
- # datomic (10)
- # emacs (1)
- # events (2)
- # hoplon (91)
- # incanter (1)
- # ldnclj (3)
- # leiningen (1)
- # off-topic (2)
- # om (41)
- # re-frame (40)
- # reagent (78)
deraen: clojars should ignore creds if you are resolving deps, since you are only talking to nginx to get static files for that
Got the 2.5.0-RC working with Lein creds file:
(configure-repositories!
(fn [m]
(merge m (some (fn [[regex cred]]
(if (re-find regex (:url m))
cred))
(gpg-decrypt ( (System/getProperty "user.home") ".lein/credentials.clj.gpg") :as :edn)))))
I was a bit suspicious about calling repo-config-fn when repos are set instead of when credentials are used, but it seems to work fine
And Clojars does indeed work fine even if creds are provided for downloading deps
Hmh, running it always has some small runtime penalty. Because config fn and gpg-decrypt
is always ran when calling set-env :repositories
it always adds about 100ms to runtime, even when only running boot help
I just downloaded the latest version of boot.sh (the one linked from https://github.com/boot-clj/boot)
@thomas: Probably you have old boot.properties
file at /.boot or /.boot/cache
Delete it and boot should create new one when you next run it
thanks @juhoteperi that did the trick
@juhoteperi: yeah the 100ms isn't great, but it does simplify the whole thing considerably
Hmm, true
did you see https://github.com/boot-clj/boot/commit/514595e0c6147515fdd6591d027fbff38c4c3ea4
so if i have that repo in my :repositories
it'll look in the env vars and throw if not found
a nice thing about this whole thing is that it dispatches on url instead of name, so you won't acidentally send creds to non-https endpoints
I think it's quite confusing that get-env
now does two different things
it can be useful but I think there should be separate functions for accesing Boot env and system env
Also, instead of list destructuring I think it would be preferred to define multiple arities, it prevents some bad uses
(defn get-env ([] ...) ([k] (get-env k nil)) ([k not-found] ...))
And the arglists will be more accurate
How about get-system-env
? It's quite long but I think it would be better than get-env
doing two things
Will probably be impossible or really hard to change this later if get-env
is changed now
Both are okay, I would maybe keep the get-
prefix so it would match get-env
But if opinion is that get-env
is bad name, maybe there is no need to match that name