halostatue
Is there a way to make a file that always recompiles?
I have a file that returns some information about the current release for our application, such as the git hashref, etc.
Is there a way to tell mix that a particular file should always be recompiled so that this never becomes stale during development?
Marked As Solved
OvermindDL1
Use @external_resource on something relevant like the application module. ![]()
Also Liked
ConnorRigby
Fwiw i just tried @external_resource "/dev/random" and sadly it didn’t work
OvermindDL1
Oh right! I had it backwards!
Well you could add a custom compiler to the compiler stage that runs before elixir and just delete that compiled file, or touch’s it or whatever. ![]()
halostatue
I don’t remember what, if anything I did for this, but I’m wondering if @external_resource ".git/HEAD" might work… (or whatever recipe is necessary to make that happen).
(Actually, it might be necessary to read the .git/HEAD to see the ref: to which it refers, e.g., .git/refs/heads/master.)
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









