beiping96
Mix will not recompile the app when change the "config.exs" in umbrella
➜ tree
.
├── README.md
├── _build
│ └── dev
│ ├── consolidated
│ │ ├── Elixir.Collectable.beam
│ │ ├── Elixir.Enumerable.beam
│ │ ├── Elixir.IEx.Info.beam
│ │ ├── Elixir.Inspect.beam
│ │ ├── Elixir.List.Chars.beam
│ │ └── Elixir.String.Chars.beam
│ └── lib
│ └── ks
│ └── ebin
│ ├── Elixir.Ks.beam
│ └── ks.app
├── apps
│ └── ks
│ ├── README.md
│ ├── config
│ │ └── config.exs
│ ├── lib
│ │ └── ks.ex
│ ├── mix.exs
│ └── test
│ ├── ks_test.exs
│ └── test_helper.exs
├── config
│ └── config.exs
└── mix.exs
12 directories, 17 files
This is a simple umbrella app
I had add import_config "../apps/*/config/config.exs" this code in “config/config.exs”
And my mix version is “1.5.2”
When I try to change the “apps/ks/config/config.exs” file, and run mix compile , it will not recompile the ks-app
I don’t know it’s a bug or something else
Any suggestion will be helpful
Thanks!
Most Liked
josevalim
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).
josevalim
You are correct. We already have an open issue to revisit how loading of configs in umbrellas work, we will make sure to revisit this issue as well.
kokolegorille
exs is for script, only ex files get compiled…
It’s also the case for test files, which ends with exs. They are not compiled.
You will get more info here
beiping96
But, if try to touch “apps/ks/mix.exs”, mix will recompile the ks-app and generate new ks-app
kokolegorille
Touch like add new dependencies?
I tried to touch one of my mix file, I add a comment, it didn’t recompile.
Try touching one of your ex files, like in lib… and see if it recompiles.







