Mix deps.get local package not working?

I have problems with mix deps.get and local package. I am developing 2 packages:

  • my_app
  • my_utils

Inside my_app mix.ex, I have

{:my_utils, path: "/path/to/my_utils"}

this points to the location of my_utils directory, next to my_app directory.

mix deps.get will download the dependencies from my_utils, but not my_utils itself. I tried deleting the deps/ and _build/ and mix.lock but mix deps.get still does not download my_utils. I think I am not understanding how mix deps works.

What made you come to the conclusion that it doesn’t download my_utils? Is there an error message which makes your say that? If yes, what’s the error message?

I expect to find directory deps/my_utils, but it is not there. From my_app directory, I also grep -rl MyUtils . to look for the modules I need from my_utils, but also nothing. No errors. It is very strange.

:path dependencies aren’t downloaded, they are already there. Also they aren’t copied into your deps folder, they will stay where they already are. But they will be compiled into the _build folder.

4 Likes

I did not know this! Ok, after I run mix compile now I see the modules inside _build just like you said. Thank you!