peoj
Prevent a mix task from automatically running mix compile
I’m using a custom mix task to download a binary dependency we have. I also wish to use that binary dependency as part of a pre-compile hook elsewhere in our code. So I have a circular dependency: Running the mix task causes the rest of the app to get compiled… but the mix task hasn’t downloaded the binary dependency yet so compilation fails.
Is there a way I can prevent the mix task from running mix compile somehow?
Most Liked
lud
Not sure if that would solve your problem but instead of using a mix task you could add a compiler step before the elixir compilation. And have that step download the binary if it is not already done. See mix compile — Mix v1.12.3
Or you could add the binary as a non-app dependency from a git repo so it is downloaded automatically with mix deps.get.
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
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









