This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-18
Channels
- # announcements (2)
- # beginners (95)
- # cider (2)
- # cljdoc (5)
- # cljs-dev (11)
- # cljsrn (2)
- # clojure (12)
- # clojure-spec (11)
- # clojure-uk (3)
- # clojurescript (27)
- # code-reviews (4)
- # cursive (9)
- # data-science (1)
- # datomic (1)
- # emacs (7)
- # fulcro (13)
- # graalvm (28)
- # graphql (6)
- # nrepl (6)
- # off-topic (13)
- # re-frame (3)
- # rewrite-clj (2)
- # shadow-cljs (29)
- # spacemacs (1)
- # sql (4)
- # tools-deps (8)
- # vim (20)
- # yada (7)
has anyone tried to use environ
with graal yet? no matter what I do, everything seems to be fully evaluated at compile time. i'd like to pull off what I do in Go/Rust (thinking 12-factor) and parse environment variables at runtime.
ignoring whether or not this is a good idea of course, if I'm instead using say, a config.edn file.
i'm wanting to put together a general configuration library a la https://github.com/spf13/viper
@gerred I just use (System/getenv)
, but you should not do this as a top-level expression, that will indeed be evaluated at compile time
I don't know how environ works, but maybe it uses macros that are executed at compile time
https://github.com/weavejester/environ/blob/master/environ/src/environ/core.cljc#L80-L81
it would be interesting to be able to use tools.deps to eventually re-def forms during AOT compilation. for example, in the Go project I work on, we set the version, git commit sha, etc., for our versioning at build-time with -X
on ldflags: https://github.com/kudobuilder/kudo/blob/master/Makefile#L15
actually, I don't see why there can't be an alias with extra-deps that does that now without adjustments to tools.deps actually and just use interns or a build-metadata namespace :thinking_face: