Zsh Mailing List Archive
Messages sorted by:
Re: Module hierarchies, aliasing, and dependencies
- X-seq: zsh-workers 12790
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Module hierarchies, aliasing, and dependencies
- Date: Sun, 10 Sep 2000 22:29:57 +0000
- In-reply-to: <E13YEke-0007UG-00@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <E13YEke-0007UG-00@xxxxxxxxxxxxxxxxxx>
On Sep 10, 10:35pm, Zefram wrote:
} Subject: Re: Module hierarchies, aliasing, and dependencies
} [E.g.] zsh/deltochar depends on zsh/zle: with dependencies set up right,
} zsh/zle will be loaded automatically before zsh/deltochar. But if you
} load zsh/deltochar under the name "local/deltochar" (or just "deltochar",
} or anything else) zsh/zle won't be loaded first, and so the load will fail
} (unless zsh/zle was already loaded).
I don't think this is really a problem -- the issue is not automatically
discovering that local/deltochar depends on zsh/zle, it's discovering that
local/zle has already substituted for zsh/zle when loading zsh/deltochar.
Put another way, I'm quite happy to have to explicitly state dependency
of local/deltochar on zsh/zle, external to any module. However, if the
user explicitly loads local/zle, I want zsh to discover that it does not
also need to load zsh/zle at the time zsh/deltochar is loaded.
An alternate solution has just occurred to me ... in the setup function in
local/zle, one could simply scan the module list for any module that has a
dependency on zsh/zle, and substitute the name local/zle in its place.
However, that would not help if `zmodload -d ... zsh/zle' was used after
the local/zle setup function was called, so some additional magic would
also be needed.
} There's another issue that on some systems name clashes between symbols
} exported by different modules isn't permitted, so every module's boot
} function has to be named differently, so we need to know the module's
} internal name in order to call any code in it. Loading under a different
} name just won't work on that kind of system (as I mentioned upthread).
Under what circumstances would it be necessary to call any code without
knowing the actual name of the shared object?
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: