Fork me on GitHub
#boot
<
2018-02-08
>
vikeri10:02:56

I have an issue with adzerk.env in the REPL, I have a REPL task that runs (env/def FOO "1") and I can access that var in the REPL but then when I try to require an ns that has (env/def FOO :required) it throws a compile error saying Required env vars:[FOO] missing-vars [FOO]. Am I using the library wrong somehow?

candera12:02:36

You need to set the environment variable FOO before running the REPL. e.g. export FOO=1234 && boot repl

candera12:02:03

The library is about environment variables, not the Boot environment.

vikeri12:02:42

@candera Ok but isn’t it enough that I def the variable in the boot task?

(deftask my-repl
  []
  (env/def FOO "1")
  (repl))
In the REPL I can do (get (env/env) "FOO") and get "1" before requiring the ns where I have (env/def FOO :required)

candera12:02:25

So, it looks like what’s happening is that you’re saying in one place, “Give me the value of the FOO env var, or “1" if it’s not defined”. And then elsewhere you’re saying, “Give me the value of the FOO env var, and throw an exception if it’s not defined.”

candera12:02:48

(env/def FOO "1") doesn’t set the environment variable. It creates a Clojure var.

candera12:02:05

And those two FOO vars are different because they’re in different namespaces anyway.

vikeri12:02:36

But somehow it seems that those properties are not available when I’m compiling from the REPL

candera13:02:49

Hmm. Interesting. I haven’t used the library before to set the environment - I’ve always just used it to read things.

seancorfield20:02:21

I'm increasingly running into this macOS-level error when running complex Boot tasks

(FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
I gather setting ulimit -n higher will help but is this symptomatic of something in Boot that should be addressed?

candera20:02:00

I used to get that all the time. Now I don’t. No idea what changed. OS upgrade maybe?

martinklepsch21:02:26

@seancorfield you might want to try this: https://github.com/boot-clj/boot/pull/663 Also would be curious about approx. number of files in fileset

martinklepsch21:02:27

While #633 might be a solution something that works without additional configuration would clearly be preferred

seancorfield23:02:33

Interesting. I have no idea how many files are in the fileset when I start seeing that error, to be honest. I don't use .bootignore tho'...