cdegroot

cdegroot

A little puzzle involving Mix, elixir_make and paths

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 priv; then 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 :wink:

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 Application.... or :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.

First Post!

cdegroot

cdegroot

Where Next?

Popular in Questions Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
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
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
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
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
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
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
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement