Getting dependencies paths of the root project in Mix

72 Views Asked by At

As my project consists of some mix projects using nifs, I'm trying to make a custom compiler, so that *.c files could be compiled along with these mix projects. Let's say I have a project A, which has a dependency of B, that has some native code depending on C. The problem arises, when C is also a dependency of A - then from Bs perspective location of Cs code is unknown, because it depends on the way of linking C to A (especially when it's linked by path), which makes it impossible to link *.c files of C to B. That is why I would like to have access from a dependency (in this case B) to a roots (A) other dependencies paths. To solve this, I considered putting native sources to the priv folder, that can be accessed by Application.app_dir/2, but I don't wish to include the sources in release. Is there any other way to solve it?

0

There are 0 best solutions below