mount

schmee 2017-08-12T12:32:41.266871Z

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

schmee 2017-08-12T12:33:02.268402Z

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

tolitius 2017-08-12T17:05:55.643442Z

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

tolitius 2017-08-12T17:16:47.702144Z

@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")

2017-08-12T17:32:16.786897Z

@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

2017-08-12T17:33:07.791774Z

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

2017-08-12T17:33:31.793774Z

Fortunately Boot was flexible enough to make that exclusion painless

schmee 2017-08-12T17:35:42.806337Z

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

tolitius 2017-08-12T17:42:10.842610Z

@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

tolitius 2017-08-12T17:43:16.848735Z

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

schmee 2017-08-12T18:11:30.003125Z

sure, but sometimes there are collisions and whatnot…

schmee 2017-08-12T18:12:28.008089Z

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 🙂