I have trouble (cleanly) solving an issue that I think should be solvable, but clearly Mix isn’t doing what I want it to do. I hope someone here can help/spot the obvious oversight.
https://github.com/cdegroot/path_dep_problems has a sample repo. There’s a
library that, among others, outputs a file in
theapp that has the library as a dependency and needs to use that generated file, then finally another application, this times a Nerves one (although I’m quite certain that this doesn’t have to do with Nerves at this point), pulls in the application presumably to make a LED light blink on a Raspberry Pi 0
The structure is quite simple and doesn’t seem to contain a lot of “you shouldn’t do that”. It smells like Mix is “too early” to have the dependency loaded as an application (so that
:code... would work), and that the
Mix.Project functions just take a stab at it (they point typically to the
_build dir in the dependency, but if I’m compiling the top level application, that’s not where the dependency is being built).
I’ve been toying with all kinds of options, but for the life of me cannot figure out how to reliably (and cleanly) set the path to the dependency’s
priv directory in
theapp's Mix config (and some suggestions on Slack didn’t do the trick either, so far). Checking out the code and running a compile in the Nerves app should make the issue quite clear, probably way more so than my attempts here to describe the issue. Any help would be much appreciated.