exrm - When to use compile-only dependencies in Elixir -


when appropriate specify dependency in deps in mix.exs , not runtime dependency in applications?

i thought applications actual applications need started before own application can started, run problem exrm wasn't putting jazz library (which think contains pure functions) release until included :jazz in applications.

an otp application more component - bunch of modules , functions may (but need not) run processes. if otp app doesn't start own supervision tree, called library application. either way, if use of libs functions @ runtime, need specify runtime dep.

in contrast, compile-time dependency ensures 3rd party code fetched , available locally (on dev/build machine). useful if 3rd party code magic outside of runtime. example own exactor or pure erlang meck mocking library. in first case exactor magic during compilation, while in second case need mocking library during tests.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -