zsh-workers
 help / color / mirror / code / Atom feed
* Removal of autoloads via module name only
@ 2007-06-25 20:18 Peter Stephenson
  2007-06-25 20:58 ` Peter Stephenson
  2007-06-26  0:52 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Stephenson @ 2007-06-25 20:18 UTC (permalink / raw)
  To: Zsh hackers list

zmodload allows you to say "zmodload -ab foo" which will mark buitin
"foo" to be autoloaded from module "foo".  This has been useless for
zsh's own modules since we put them in the namespace zsh/...; none of
the four autoloadable features allow slashes and we don't do any
automatic mangling on module or feature names (nor do I think we
should).  As far as I can see, therefore, this ability is just a
historical confusion.  The only possible exception would be if someone
has their own module which doesn't use a namespace (which violates our
guidelines anyway).

Is anyone going to be concerned if I remove this ability, so that
you would need to give both the module and the builtin etc. to be
autoloaded explicitly?  I stronly suspect the answer is "no", in which
case I will remove it in the next round of feature autoloading changes.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removal of autoloads via module name only
  2007-06-25 20:18 Removal of autoloads via module name only Peter Stephenson
@ 2007-06-25 20:58 ` Peter Stephenson
  2007-06-26  0:52 ` Bart Schaefer
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2007-06-25 20:58 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson wrote:
> zmodload allows you to say "zmodload -ab foo" which will mark buitin
> "foo" to be autoloaded from module "foo".  This has been useless for
> zsh's own modules since we put them in the namespace zsh/...; none of
> the four autoloadable features allow slashes and we don't do any
> automatic mangling on module or feature names (nor do I think we
> should).

This isn't quite true, as I just discovered from a test in V01zmodload.ztst:

alias -A example=zsh/example
zmodload -ab example

used to work.  But I'm prepared to gloss over that if you are.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removal of autoloads via module name only
  2007-06-25 20:18 Removal of autoloads via module name only Peter Stephenson
  2007-06-25 20:58 ` Peter Stephenson
@ 2007-06-26  0:52 ` Bart Schaefer
  2007-06-26  9:06   ` Peter Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2007-06-26  0:52 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

On Jun 25,  9:18pm, Peter Stephenson wrote:
}
} Is anyone going to be concerned if I remove this ability, so that
} you would need to give both the module and the builtin etc. to be
} autoloaded explicitly? I stronly suspect the answer is "no", in
} which case I will remove it in the next round of feature autoloading
} changes.

Actually, use this all the time.  Or more precisely, I use the thing
you mentioned in your next email, all the time:

} alias -A example=zsh/example
} zmodload -ab example

I have a rather complicated set of startup scripts, one of which has
the job of discovering that I'm running an uninstalled zsh binary out
of the compilation build tree and therefore frobbing the module path
(and installing all sorts of module aliases) so that everything "just
works" loading the modules out of Src/Builtins and Src/Modules instead
of by using their regular namespace paths.

This makes extensive use of exactly the aliasing trick above, and I'd be
rather disappointed to have to try to figure out how to rewrite it all
so that it still works.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removal of autoloads via module name only
  2007-06-26  0:52 ` Bart Schaefer
@ 2007-06-26  9:06   ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2007-06-26  9:06 UTC (permalink / raw)
  To: Zsh hackers list

Bart Schaefer wrote:
> This makes extensive use of exactly the aliasing trick above, and I'd be
> rather disappointed to have to try to figure out how to rewrite it all
> so that it still works.

OK, it's easy to keep; I probably wouldn't have thought of it if I'd
spotted the business with aliases earlier.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-26  9:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25 20:18 Removal of autoloads via module name only Peter Stephenson
2007-06-25 20:58 ` Peter Stephenson
2007-06-26  0:52 ` Bart Schaefer
2007-06-26  9:06   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).