I’m very new to Phoenix, so, apologies if this is badly phrased / something obvious! I have tried reproducing this on a test app and cannot, so, it probably is something unique to our codebase. With that said, it’s strange and quite reproducible!
What’s happening is this: In my config/dev.exs I create a config var from a System call (I can’t reproduce the issue unless I set the env):
config :my_app, wibble: !!System.get_env("FOO")
Then I start the app with FOO=BAR iex -S mix phx.server
Then I update some template file and phoenix stops with:
You must restart your server after changing the following files:
* config/dev.local.exs
.....
Note, I was editing something in lib/app/…something.html.heex .. nothing which would normally cause a reload.
I tried to add some debug statements, eventually digging into the phoenix/code_reloader/server.ex and adding some dbg around the extract_stale code.
I poked around the stat values, and I got this zero value for the manifest:
|> Enum.map(&Mix.Utils.last_modified(&1)) #=> [0]
My assumption is that for some reason the compile.elixir is being written to while it’s being read (or something) and that’s why it’s getting a zero value and therefore thinking everything is out of date.
Does any of this make sense? Is there some obvious fix? Can anyone explain why this would happen at all, and seemingly only when there’s an ENV var set?
Sorry for not being able to write more clearly, like I said, very new to this (wonderful) ecosystem!
I’m running on OSX if that makes a difference.






















