Skip to content

Feature Suggestion - Opt-in appConfigPath #46

Description

@andreas-ementio

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:

  1. Any change to your app's config/ invalidates the Nix cache for every buildMix dependency
  2. 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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions