-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Env/def does not persist vars with dots #3
Comments
It seems like it would be tricky to support env vars with dots, as you can't define Clojure symbols in a namespace that include dots. Interestingly, Clojure doesn't complain when you try to define such a symbol, but then it is not possible to retrieve the value of the symbol, at least not intuitively: boot.user=> (def database_jdbc.url 42)
#'boot.user/database_jdbc.url
boot.user=> database_jdbc.url
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: database_jdbc.url, compiling:(/var/folders/h0/jb2j4f310zx08ynwfxw8lxg00000gn/T/boot.user2431431541018554738.clj:19:1)
java.lang.ClassNotFoundException: database_jdbc.url |
That smells like the reason why I cannot see it in |
OK, I'm following now. From googling, it does seem like including dots in Java system properties is a common thing to do, and it's definitely possible, at least, to set Java system properties including dots. For env/def, perhaps we could establish some convention that dots will be replaced with (some character or string) in the symbols that it defines? Something like:
On an interesting note, it looks like currently, system properties including "." are intentionally omitted from |
Yep you got it. So I agree it can be very confusing though... |
Sorry my comment above was totally off. I'd suggest we add a warning in the else branch of that |
Sounds like a good idea to me 👍 |
Enqueued in my todo list |
For example, in:
The first env var in not present when I query it with
(env/env)
.The text was updated successfully, but these errors were encountered: