I have a few questions about support for .ez archives, and one or two suggestions as well.
- is a timeline for fully supporting them?
- does the -include_lib(...) directive now work (in R15) when the headers are in an archive?
- does code:lib_dir/2 work properly with archives?
As a suggestion: I've noticed that the way most people build an escript binary is to glue everything together into a zip file with the appropriate header content and I wonder whether having 'executable (.ez) archives' would be a better approach? Perhaps this works today and I haven't figured it out? What are peoples thoughts about this?
Cheers,
Tim
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Hello list,
I have a few questions about support for .ez archives, and one or two suggestions as well.
- is a timeline for fully supporting them?
- does the -include_lib(...) directive now work (in R15) when the headers are in an archive?
- does code:lib_dir/2 work properly with archives?
As a suggestion: I've noticed that the way most people build an escript binary is to glue everything together into a zip file with the appropriate header content and I wonder whether having 'executable (.ez) archives' would be a better approach? Perhaps this works today and I haven't figured it out? What are peoples thoughts about this?
On Mon, Mar 5, 2012 at 23:54, Tim Watson <watson....@gmail.com> wrote:Hello list,
I have a few questions about support for .ez archives, and one or two suggestions as well.
- is a timeline for fully supporting them?
- does the -include_lib(...) directive now work (in R15) when the headers are in an archive?
Björn, is there a timeline?
- does code:lib_dir/2 work properly with archives?
Yes.
As a suggestion: I've noticed that the way most people build an escript binary is to glue everything together into a zip file with the appropriate header content and I wonder whether having 'executable (.ez) archives' would be a better approach? Perhaps this works today and I haven't figured it out? What are peoples thoughts about this?
The current trick with the shebang header works on many platforms.
It would however be nice with executable archives (without any
shebang), but these solutions tend to be more platform specific
(non-portable).
/Håkan
There is no timeline and it is even questionable if it should ever work. What is the argumentfor having the include files inside the archive?
What I meant was that I am not convinced that it is necessary and very useful to have the include filesinside an archive (while using them).But it might be possible to convince me :)
Yaws and gettext requires some .hrl files for compiling dynamic pages.
I think there may be other cases where code is compiled during runtime
where it is useful to have access to the .hrl files.
/Anders
>
> /Kenneth
>
>
> On Tue, Mar 6, 2012 at 1:20 PM, Ulf Wiger <u...@feuerlabs.com> wrote:
>>
>>
>> On 6 Mar 2012, at 13:02, Kenneth Lundin wrote:
>>
>> There is no timeline and it is even questionable if it should ever work.
>> What is the argument
>> for having the include files inside the archive?
>>
>>
>> I ran into this problem, and made an "OTP patch" for it:
>>
>> http://article.gmane.org/gmane.comp.lang.erlang.general/52060
>>
>> (Don't think I ever submitted it as a patch, since Håkan and I disagreed
>> on some of the implementation details).
>>
>> I wrote: "The idea (see http://github.com/esl/run_eqc) was that it should
>> be possible to deliver an application as a single archive, supporting
>> command-line operations, interactive code loading, and compilation including
>> hrl files, parse_transforms etc., without having to unpack the archive."
>>
>> Philip Stanhope wrote: "Very cool. I can see how this will make
>> deployments very easy."
>>
>> http://article.gmane.org/gmane.comp.lang.erlang.general/52061
>>
>> Dizzy writes: "+1 on this feature -- it opens some very interesting
>> doors."
>>
>>
>
>
On Tue, Mar 6, 2012 at 8:03 AM, Kenneth Lundin <kenneth...@gmail.com> wrote:What I meant was that I am not convinced that it is necessary and veryuseful to have the include filesinside an archive (while using them).But it might be possible to convince me :)
Yaws and gettext requires some .hrl files for compiling dynamic pages.
I think there may be other cases where code is compiled during runtime
where it is useful to have access to the .hrl files.
/Anders
> In general, I think .ez archives are an ideal unit of packaging and
> distribution (as dependencies) and therefore making them fully self
> contained is very helpful. If you specify 'lager >= 1.0.2' as a dependency
> and all I have to do is find and fetch the archive (and check the MD5 and
> whatnot) then stick it somewhere useful on the machine, the subsequent build
> (handling of dependent packages), release assembly and other things just
> work really nicely. Having to 'manually' pull the includes out before being
> able to utilise the archive as a compile time dependency is just a bit
> annoying for tools authors that's all.
+1
Clojure gets something like this for free since it uses Java's jar
system. Jars can contain configuration, source, images, or anything
else. Not only do all the distribution and build tools make use of
this, but the libraries contain things to make reading files from
inside the jar really trivial.
I would love to see something similar in Erlang.
jack.