beiping96

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

josevalim

Creator of Elixir

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

josevalim

Creator of Elixir

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

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

beiping96

But, if try to touch “apps/ks/mix.exs”, mix will recompile the ks-app and generate new ks-app

kokolegorille

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.

Where Next?

Popular in Questions Top

bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New

We're in Beta

About us Mission Statement