Reputation: 4264
I've got a couple useful libraries I've build for elixir. I've put them both up on hex. I already use library A in library B, and I've just incorporated library B as a dependency for library A. Now of course library A won't build.
Error while loading project :a at /Users/me/fun/a/deps/ar ** (Mix) Trying to load ArgumentParser.Mixfile from "/Users/me/fun/a/deps/a/mix.exs" but another project with the same name was already defined at "/Users/jistone/fun/a/mix.exs"
Here is what I have tried so far:
a
from deps foldera
from mix.lockdeps/b/mix.exs
, adding a path:
for the a
deps entry to point to the project folder.mix.exs
for a
and b
to point at their respective project foldersAll fail with appropriate error messages.
So question is: how to get mix to recognize a dependency is satisfied by the current project being built?
edit: more details
Package a
is a library for parsing command line arguments. Package b
is a mix task for generating README.md files. In package b
I used package a
to parse the command line arguments for the mix task. Now I am trying to use the mix task to generate the README.md for package a
, and I get the above failure.
I can workaround by starting an iex session and loading the relevant beam files, but I'd like to get the mix task working if possible ...
Upvotes: 1
Views: 1031
Reputation: 4264
3 solutions I've found (none of them perfect)
Building the readme docgen project as an escript and then removing it as a dependency.
Changing the name of the project in the mix.exs file, generating the docs, then changing it back.
Loading all the beam files using the -pa arg in iex and running the code manually.
Upvotes: 0