Fork me on GitHub
#mount
<
2017-08-12
>
schmee12:08:41

hello! is it possible to alias a defstate under a different name?

schmee12:08:02

I tried (def alias some-defstate) but that doesn’t seem to work

tolitius17:08:55

@schmee: what would be a reason to do that?

tolitius17:08:47

@pandeiro: usually you would only keep "`required`" config params in a classpath. you can replace an existing config file in a classpath by another config file in a classpath using :resource:

(cprop/load-config :resource "path/to/another/config-in-classpath.edn")

pandeiro17:08:16

@tolitius Thanks; so the solution I came up with was to manually exclude the classpath config prior to building the uberjar for deployment; that way the actual production config is used, not merged with the repo's "production-like" config

pandeiro17:08:07

The reason for having a production-like config checked in was for production CLJS builds and being able to run the production uberjar in docker locally

pandeiro17:08:31

Fortunately Boot was flexible enough to make that exclusion painless

schmee17:08:42

@tolitius just convenience 🙂 I want to have long names in the code, but shorter names at the REPL

tolitius17:08:10

@pandeiro I see. I usually keep a "`the repo's "production-like" config`" in dev-resources which is in classpath during development, but never builds into an uberjar

tolitius17:08:16

@schmee: scratch that.. (the previous idea). can't you use tabs for autocompletion in REPL?

schmee18:08:30

sure, but sometimes there are collisions and whatnot…

schmee18:08:28

this is obviously not a big problem, the idea just hit me that it would be useful in this case, so now I know there there is no built-in way to do it at least 🙂