[Bug/Feature] Archives can not currently have dependencies

30 views
Skip to first unread message

Isaac Whitfield

unread,
Nov 28, 2016, 7:57:25 PM11/28/16
to elixir-lang-core
Hi all, as usual apologies if this has been covered.

I'm working with archives, and it appears that dependencies are not bundled in the archive - trying to start anything from the dependencies causes this:

{:error, {:dependency_module, {'no such file or directory', 'dependency_module.app'}}}


I'm not sure if this is a bug, or just by design. I can't really think of a reason that we wouldn't want people to be able to use dependencies in archives, so it makes me think the former. It seems easy enough to fix (the `archive.build` task only looks in "_build/<env>/lib/<my_module>" for things to include).

Opinions? I was going to put this on GitHub but as I'm not sure whether it's intentional or not, I figured I'd drop it here just in case. Of course, maybe I'm doing something wrong myself... but I can't imagine what it would be. 

Isaac Whitfield

unread,
Nov 28, 2016, 8:11:27 PM11/28/16
to elixir-lang-core
After broadcasting on Slack, it appears you can control the input directory manually - but it seems quite odd that the default does not include dependencies. Archives have Mixfiles (usually), and because it runs compilation you can see your dependencies being built. It's very unintuitive. 

Perhaps we could consider changing the default to include the whole build dir?

José Valim

unread,
Nov 29, 2016, 3:54:36 AM11/29/16
to elixir-l...@googlegroups.com
Archives do not support dependencies. That's on purpose. Because archives are loaded onto the VM when it starts, any dependency would be loaded into your application and archives loading the same dependencies would conflict with each other.

Archives are on purpose small and we don't expect it to change. I will make sure to document this on the archive.build task.



José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b81e5d35-e2aa-4c5e-95df-9f20b8d9361c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages