I've started using Elixir + Phoenix Framework and started incorporating the addict library for user registration/authentication.
The docs for addict tell me to update the config.exs
for the :addict
app.
config :addict, not_logged_in_url: "/error",
db: MyApp.MyRepo,
user: MyApp.MyUser,
:
Replacing the db and user values did not take affect till I ran mix deps.compile
for the addict code to pick up the configs.
Now my question is, is it assumed to run mix deps.compile
when you make changes to config.exs
?
The addict docs don't state this and for a newcomer like me, this isn't really obvious. I only realized this when I actually looked into addict's code and saw that it was being set at compile time via a module attribute (thus the necessity to run mix deps.compile
).
You need to recompile dependencies only if they have compile time configuration. Compile time configuration as such is not very common, so you should ping the addict
folks and ask them to have better instructions to what happens when someone configures addict
after it was compiled. Or convince them to avoid the compile time configuration in the first place if they can.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With