BTW Adding even a single blank char in any ex files recompiles on my machine.
And exs files are not meant to be compiled, they are used in script mode.
From the doc
In addition to the Elixir file extension .ex, Elixir also supports .exs files for scripting. Elixir treats both files exactly the same way, the only difference is in intention. .ex files are meant to be compiled while .exs files are used for scripting. When executed, both extensions compile and load their modules into memory, although only .ex files write their bytecode to disk in the format of .beam files.
And just imagine one case, we will put something in “apps/ks/config/config.exs”, and we will get the config from this file, looks like @url Application.get_env(:ks, :url) in ks-app
When we try to change the config and recompile, the new config should be loaded to “.ex” file, it should work, right?
And I’m sure that change the “apps/ks/mix.exs” is useful, so it’s not something about diff between “.ex” and “.exs”, it is a problem about mix
➜ x mix compile
➜ x vim apps/ks/mix.exs
➜ x mix compile
==> ks
Compiling 1 file (.ex)
Generated ks app
➜ x
Mix should recompile the project if you change any file inside “config”.
My guess is that you may be invoking a custom task that does not ask your project to compile. It is the responsibility of every Mix task to say which state they expect the application to be: compiled, loaded, etc.
If it still fails, can you push a sample project that reproduces the issue to GitHub? I will gladly take a look at it.
The issue was “resolved” by not duplicating config files. From Elixir v1.9, new apps have a single config/ directory in the umbrella, all other apps point to said config/ directory. So if you move to the same structure, then the problem disappears.
Unfortunately we cannot really track it otherwise, since the loading of config files is done dynamically (i.e. we don’t know upfront what we are going to load).