Ensure that the loaded config survives an application reload#1
Ensure that the loaded config survives an application reload#1tompave wants to merge 1 commit intomrluc:masterfrom
Conversation
…fig will survive application load and reload.
|
That makes perfect sense to me as default behavior; I want it. But I'd like to make sure I think it through, because it seems like this could be breaking to some people. Could you describe your use case? I ask because we're already encouraging people to use DeferredConfig from the Application.start callback, which means that the app shouldn't be missing config due to an ordinary app stop/start, so is the use case related to hot code reloading and not getting overridden by eg. app resource files? |
|
Hi, thanks for the quick reply. To be honest I don't have a use case for this. I'm using this package for a project I'm working on, I was reading the sources and I noticed that no option was passed to I just thought that this makes sense because I imagine that — as you mentioned — with the current implementation hot-code-reloading would wipe out the dynamic configuration values. |
Pass
persistent: truetoApplication.put_env/4, so that the new config values will survive the application load and reload events.Documented here. As example, it's used by
Mix.Config.persist/1.