[erlang-questions] Configuring rebar across directories
Dave Smith
dizzyd@REDACTED
Tue Jun 18 22:43:44 CEST 2013
Yes, seems reasonable, Juan. I don't believe it would break anything.
D.
On Tue, Jun 18, 2013 at 9:41 AM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
> On Tue, Jun 18, 2013 at 5:02 PM, Juan Jose Comellas wrote:
> > Tuncer, is there a reason why the rebar lib_dirs configuration
> > setting only allows relative paths? Right now the function that
> > expands these paths looks like this:
>
> I'm not aware of any reason and I think you're the first to request
> support for absolute paths.
>
> > expand_lib_dirs([], _Root, Acc) ->
> > Acc;
> > expand_lib_dirs([Dir | Rest], Root, Acc) ->
> > Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])),
> > FqApps = [filename:join([Root, A]) || A <- Apps],
> > expand_lib_dirs(Rest, Root, Acc ++ FqApps).
> >
> > Changing it to something like this would resolve this problem:
> >
> > expand_lib_dirs([], _Root, Acc) ->
> > Acc;
> > expand_lib_dirs([Dir | Rest], Root, Acc) ->
> > Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])),
> > FqApps = case filename:pathtype(Dir) of
> > absolute -> Apps;
> > relative -> [filename:join([Root, A]) || A <- Apps]
> > end,
> > expand_lib_dirs(Rest, Root, Acc ++ FqApps).
> >
> > Would this addition be accepted into rebar? I haven't created a pull
> > request for this because I don't know what the rationale was for
> > making these paths relative.
>
> This looks reasonable to me, but I can't speak for Dave.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130618/8f05d6a2/attachment.htm>
More information about the erlang-questions
mailing list