beno
Documenting the use of :included_applications
I have been struggling with trying to get an application deployed to a staging/production server today. I say struggle, because it still doesn’t work and as smooth as the developer experience is in Elixir, so bumpy is the road to deployment.
In this young environment I can understand how the tools aren’t quite there yet or in heavy flux with all kinds of versioning and compatibility conflicts. I can deal with those. But one thing I encountered was genuinely baffling, and that is that the code you develop appears to be not the same as the code you deploy, especially regarding dependencies. Things that compile and run without problems in development fail to run in production, mainly because of mix configuration and dependency issues.
One thing that cost me a sizeable part of my day was the use of non-application external libraries. After juggling lots of deps in my (umbrella) application, it compiles without issue and gets released to staging. Only at runtime the application fails because it misses those modules. I found out that adding them to :included_applications is needed to make this work. This seems like such a basic thing I was surprised that the documentation makes no mention of this. This leads me to believe I am missing something maybe? Finally, the production app I have now built and deployed is not behaving the same as the application I built in development, but I haven’t quite figured out what causes this.
In summary, if I am right about those external libraries and :included_applications , I think we should have this in the docs front and center. If I’m wrong, can someone please set me straight? Stepping back a bit, I think the development and production code should behave more similarly. Things that compile/run in development should also compile/run in release. In my experience, right now they don’t.
Sorry for the rant, everyone, thank you for your time.
Most Liked
josevalim
Yes, this should be filled as bug in the Rackla application. They should
not list a callback module if they don’t implement those callbacks.
Regarding the errors, yes, they only happen at runtime and in production
because the applications list is a list of runtime applications needed in
production. Although some tools warn of they see you are missing some
dependencies.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









