Closed mkreis closed 2 years ago
I can understand the reasoning why to exclude those files from versioning, but in my opinion it is more important not to exclude any file which must be present in order to run the project.
The reason the files are excluded is due to the fact that they're likely to contain secretes such as database connections. Checking these files by default could lead to these secrets being leaked, and so the default configuration errs on the side of caution.
Hi Dmitri, thank you for the clarification. That was also my assumption why they are excluded.
The reason I opened this issue nonetheless is that I ran into this problem and spent quite some time figuring out what was wrong, and it seems I'm not the only one: https://llsouder.blogspot.com/2018/10/more-yak-shaving-in-clojure.html
So perhaps it is possible to improve the experience by allowing configuration files to be missing? What do you think?
If the configuration is missing then the app would likely not be able to function. Also, worth noting that configuration will not necessarily come from files. For example, it could be provided via environment variables, so it can be a valid use case not to check in the files. I think it might be better to add a note somewhere in documentation regarding this.
Precondition:
dev-config.edn
andtest-config.edn
) are automatically created.lein start
lein start
againObserved:
dev-config.edn
andtest-config.edn
(because in.gitigore
), therefore starting application fails:Syntax error compiling at (/private/var/folders/yz/x36xcq0s0fd3fb1l7vtpp7zm0000gn/T/form-init14491551307401061101.clj:1:126). could not find a non empty configuration file to load. looked in the classpath (as a "resource") and on a file system via "conf" system property
Expected:
dev-config.edn
andtest-config.edn
are present (not in .gitignore
)