[erlang-questions 50] Re: code:lib_dir and .ez archives

Eric Merritt ericbmerritt@REDACTED
Sun Mar 27 15:57:43 CEST 2011


There are a few problems like this in the escript stuff. For example,
there isn't any way to do releases in escript/ez archives. I think the
main problem is that the escript stuff just hasn't been fully
integrated into the erlang world. It seems like its 80% of the way
there but that additional 20% is still hanging out. I would love to
see those extra cases covered.

On Sat, Mar 26, 2011 at 7:06 PM, Ulf Wiger
<ulf.wiger@REDACTED> wrote:
>
> I packed up EQC Mini and PropEr as a single archive to make it easier to include in an OSS project.
>
> http://github.com/esl/run_eqc
>
> This works very well, except when compiling modules that require the eqc/proper .hrl files. The -include_lib/1 directive doesn't work if the .hrl is inside an archive.
>
> This made me think that the compiler - actually probably file.erl - should support paths where a component is an .ez archive, and do the sensible thing (act as if it were a real path).
>
> But first, I noticed that code:lib_dir/1 acts very strangely when the application is loaded from an .ez archive (see below).
>
> Is this deliberate, or is it a bug?
>
> BR,
> Ulf W
>
> $ erl -pa run_proper.ez/proper/ebin
> Erlang R14B (erts-5.8.1) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false]
>
> Eshell V5.8.1  (abort with ^G)
> 1> code:which(proper).
> "run_proper.ez/proper/ebin/proper.beam"
> 2> code:lib_dir(proper).
> "./run_proper"
> 3> {ok,Z} = zip:zip_open("run_proper.ez",[memory]).
> {ok,<0.35.0>}
> 4> zip:zip_get("proper/include/proper.hrl",Z).
> {ok,{"proper/include/proper.hrl",
>     <<"%%% Copyright 2010 Manolis Papadakis (manopapad@REDACTED)\n%%%            and Kostis Sagonas (kostis"...>>}}
> 5> zip:zip_get("proper/ebin/proper.app",Z).
> {ok,{"proper/ebin/proper.app",
>     <<"{application,proper,\n             [{description,\"A QuickCheck-inspired property-based testing tool f"...>>}}
>
>
>
> Ulf Wiger, CTO, Erlang Solutions, Ltd.
> http://erlang-solutions.com
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list