Currently, appConfigPath is always set on every buildMix derivation. It either uses the explicitly provided --app-config-path or auto-computes a relative path from the output location back to config/.
Most dependencies don't use Application.compile_env or read config at compile time. Setting appConfigPath on all of them means:
- Any change to your app's config/ invalidates the Nix cache for every buildMix dependency
- It's unnecessary for the vast majority of deps
Proposal
Make appConfigPath opt-in on a per-dependency basis.
maybe via a new CLI option, e.g.
--config-deps, that accepts a comma-separated list of dependency names that
actually need compile-time config access
mix deps.nix --config-deps phoenix,swoosh
Only the listed dependencies would get appConfigPath in the generated Nix file. All other buildMix derivations would omit it.
not sure if the feature should be implemented like this,
i will think about it in the next days,
Currently, appConfigPath is always set on every buildMix derivation. It either uses the explicitly provided --app-config-path or auto-computes a relative path from the output location back to config/.
Most dependencies don't use Application.compile_env or read config at compile time. Setting appConfigPath on all of them means:
Proposal
Make appConfigPath opt-in on a per-dependency basis.
maybe via a new CLI option, e.g.
--config-deps, that accepts a comma-separated list of dependency names that
actually need compile-time config access
mix deps.nix --config-deps phoenix,swoosh
Only the listed dependencies would get appConfigPath in the generated Nix file. All other buildMix derivations would omit it.
not sure if the feature should be implemented like this,
i will think about it in the next days,