Fork me on GitHub
#cider
<
2023-12-15
>
Nim Sadeh23:12:50

Is there a way to set a bunch of env variables in cider from a .env file? I know I can use setenv but my app has a bunch of them

aisamu09:12:24

Not cider, but I use envrc and direnv for that

vemv12:12:07

Yes, that project also popped up in this recent discussion https://clojurians.slack.com/archives/C099W16KZ/p1701028228710109 Generally, for JVM processes consider favoring setting Java propeties (controllable with tools.deps aliases / Lein profiles) over env variables - they're more idiomatic and flexible (can be changed at runtime)

Nim Sadeh12:12:56

How would I set a JVM property in Cider/clojure-lsp then?

vemv12:12:02

you set it with :jvm-opts in a specific deps.edn alias and tell cider to use that alias

👀 1
Nim Sadeh12:12:51

Does that instruction get bundled with the jar if you run uberjar?

vemv12:12:54

uberjars are run with java , so you run approximately java myuber.jar -Dmy.property=123