If an Elm file is modified less than one second after it is compiled, then future runs of elm-make will fail to recompile the file until it is modified again. I believe this is due to the fact that the filesystem (on Mac OS) only has one-second resolution. To fix this, I suspect elm-make should rebuild a file if the source file's timestamp is >= the .elmo file's timestamp (rather than only if it is >).
To reproduce, start with the following files:
A.elm
module A exposing (value)
import B
import C
import Html
value = "A0"
main = Html.text <| Debug.log "A" <| String.join ":" [ value, B.value, C.value ]
If an Elm file is modified less than one second after it is compiled, then future runs of elm-make will fail to recompile the file until it is modified again. I believe this is due to the fact that the filesystem (on Mac OS) only has one-second resolution. To fix this, I suspect
elm-make
should rebuild a file if the source file's timestamp is>=
the .elmo file's timestamp (rather than only if it is>
).To reproduce, start with the following files:
A.elm
B.elm
C.elm
Then use the following script:
go.sh
Running
go.sh
produces:But it should produce
A: "A1:B2:C1"
(with B2) as the last line.