Are you supposed to run mix deps.compile after updating config.exs?

I started using the Elixir + Phoenix Framework and started using the addict library to register / authenticate the user.

The docs for the addict will tell me to update config.exs for the application :addict .

 config :addict, not_logged_in_url: "/error", db: MyApp.MyRepo, user: MyApp.MyUser, : 

Replacing the db and user values ​​did not affect until I ran mix deps.compile for the dependency code to get the configs.

Now my question is: is it supposed to run mix deps.compile when making changes to config.exs ?

For drug addicts, this is not indicated, and for beginners like me, this is not so obvious. I understood this only when I actually looked at the addict's code and saw that it was installed at compile time through the module attribute (thus, you need to run mix deps.compile ).

+5
source share
1 answer

You only need to recompile the dependencies if they have a compile time configuration. Compile-time configuration as such is not very common, so you should ping addict users and ask them for better instructions on what happens when someone configures addict after compiling it. Or convince them to avoid compile-time configuration, if possible.

+9
source

All Articles