nextjournal / clerk

⚡️ Moldable Live Programming for Clojure
https://clerk.vision
ISC License
1.79k stars 77 forks source link

Read config values from ENV, Java properties and CLI args #618

Closed Sohalt closed 8 months ago

Sohalt commented 8 months ago

Some work towards unifying where configuration is read from.

Specifically this allows specifying the clerk cache location on the command line or with exec-args.

mk commented 8 months ago

You can specify Java props from the Clojure cli as well so I don’t understand what problem this solves. Can we start with that?

Sohalt commented 8 months ago

You can specify them on the clojure cli, when invoking it yourself, but not eg in :exec-args for use in garden or when calling clerk "as a library" from other clojure code.

mk commented 8 months ago

An alias can specify jvm opts which should cover the garden use case? When using clerk as a library you can set the JVM prop programmatically.

jackrusher commented 8 months ago

@mk The requirement to deal with both JVM opts and potential command line args come from me. Let's chat about it tomorrow.

Sohalt commented 8 months ago

I'm just writing to properties for now.