Fork me on GitHub
#tools-deps
<
2020-06-18
>
mokr14:06:31

Just for information in regards to my question above: I got the uberjar generation with AOT working after switching to https://github.com/seancorfield/depstar and doing AOT by passing the -C option. It was a lot of trial and error so maybe I could have gotten https://github.com/tonsky/uberdeps to work as well. On top of of this I surfaced an issue that has been in my code for a long time: I run my prod server on port 6000, but remap it in docker-compose. Due to that I have never experienced that browsers (Chrome, FF, …) https://superuser.com/questions/188058/which-ports-are-considered-unsafe-by-chrome, before I now attempted to run the jar locally and couldn’t connect.

markbastian19:06:27

Is there deps.edn analogue of the lein-environ plugin? I.e. a facility for setting an env map in a sidecar file (or your global deps.edn file) that is merged with the global env?

alexmiller19:06:45

not to my knowledge

markbastian19:06:12

Is it possible to set env vars in deps.edn or is that not really what it's meant for?

alexmiller19:06:32

it's not possible right now

👍 1
alexmiller19:06:50

you can of course just set them on the call to clj using normal shell methods

alexmiller19:06:30

I wouldn't rule out the possibility of adding something like that in the future

markbastian19:06:49

Yeah, just trying to figure out the "right" way to set them when launching a REPL from Cursive. Using the Cursive config works fine for now.

alexmiller19:06:22

in clj, one option is to create an alias that adds an :extra-paths and then load config via a resource

alexmiller19:06:55

an alias can also set Java system properties

alexmiller19:06:03

so those are two paths to have an alias add extra config

markbastian19:06:26

That makes sense. "an alias can also set Java system properties" sounds promising. Thanks!

alexmiller19:06:57

but be careful that you're not putting sensitive values in your deps.edn

👍 1
alexmiller19:06:30

you'd want to have a system property that point to a file (or env var) to read a sensitive value