fireproofsocks
Avoiding re-compiling via build_per_environment: false
I had a question about using build_per_environment: false in my mix.exs… I have a simple app that doesn’t have any compile-time configuration, so I thought I could use build_per_environment: false so I wouldn’t have to compile the app twice (once for dev and once for test). Including build_per_environment: false in my mix.exs does cause the .beam files to get compiled into _build/shared/lib, but the app still has to compile once per environment, which is not what I expected. The app compiles when I start it in dev via iex -S mix and it re-compiles when I run tests via mix test. Why is it re-compiling? Am I misunderstanding what build_per_environment: false does? Or how the compilation works? Thanks for any clarifications!
First Post!
D4no0
I’ve just tried it and it works for me:
Maybe you need to use a newer elixir or OTP version?
I’ve used elixir 1.17.3 and OTP-26.2.5
Popular in Questions
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex











