On 6 March 2013 00:59, Ildar Mulyukov <il...@users.sourceforge.net> wrote:
> On 05.03.2013 22:44:40, Hisham wrote:
>> On 5 March 2013 06:27, Ildar Mulyukov <il...@users.sourceforge.net>
>> wrote:
>> > Thinking of LR as a package manager/builder you have exactly the
>> > situation described. Though Hisham still didn't agree with this
>> point
>> > of view. ))
>>
>> Ah, I don't think we're in disagreement... what part exactly are you
>> referring to?
>
> May I remind you of this thread?
> http://thread.gmane.org/gmane.comp.lang.lua.luarocks/3304 . We had a
> discussion that had not closed as some questions left unanswered.
> JFYI.

Thank you for the reminder. I reread the thread, lots of material
there. One update we had since then on the subject was the
introduction of the --deps-mode flag, which allows one to configure
their desired behavior for multi-trees. As you mentioned in that
thread, coming up with a single behavior that fits all situations is
hard -- there's no "right" choice that fits all situations.

When rocks_trees has multiple entries, the behavior of searching for a
dependency now changes according to --deps-mode.

Let's assume that:
* there is an array of trees listed in rocks_trees
* and there is a "current" tree, which may be either
  * the one at the bottom of the rocks_trees list,
  * or one explicitly given with --tree
  * or the "home" tree if --local was given or local_by_default=true
is configured (usually at the top of the list)

Given that,

--deps-mode=one - Consider only the tree at the top of the list
(possibly, the one given by the --tree flag, overriding all entries
from rocks_trees), ignore all others
--deps-mode=all - Consider all trees: if a dependency is installed in
any tree of the rocks_trees list, we have a positive match.
--deps-mode=order - Consider only trees starting from the "current"
one in the order.

(The deps_mode variable can also set this in the config file)

The "order" mode looks magic, but the idea is that when a user
installs a rock in a 'lower-level' tree, it should not depend on rocks
from the 'higher-level' tree, but the other way around is permitted.
For when dependencies should be entirely contained within a single
tree, there's --deps-mode=one.

I think this at least alleviates the issues regarding multi-tree
behavior and the scenarios that ensued. What specifically are the
remaining issues? Let's work on those.

-- Hisham
http://hisham.hm/

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to