zsh-workers
 help / color / mirror / code / Atom feed
* RE: Wordcode files and compinit
@ 2000-03-24 12:05 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2000-03-24 12:05 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> > Hm. The wordcode files already store the complete pathnames used when
> > calling zcompile. That could be changed to prepend $PWD to names not
> > starting with a slash. Then we could change the patch for
> > `autoload -w'
> > to make `autoload -w foo.zwc a b c' mark only a, b and c for
> > autoloading. And then we could make `autoload -mw foo.zwc
> > "*/Completion/Debian/*"'
> > mark only those functions for autoloading.
> 
> This won't help in case of completion.

It isn't possible any more anyway (because of `zcompile -c ...').

> We need the information from
> comments and comments are lost when compiling zsh code. With current way
> completion is initialized, functions must be present in source form. I
> am not happy about it.

I'm very happy with it. No way for anyone to give completion functions 
(or any functions) without also giving the source code.

> Keeping two form of the same function always
> increases the possibility of two getting out of sync.

Have you had a look at the zrecompile function I sent? It should make
this simple. Also, the wordcode files could be organised in a way that 
makes the source files be preferred when they are younger (just create 
a wordcode file for each completion directory named like the directory 
with a trailing `.zwc'). That would be less efficient than using one
big wordcode file, though (zrecompile can help with both approaches).
And anyway, the distributed functions will, from a user's or
administrator's point of view, be relatively stable.

Please also remember that in the part of my message which you didn't
quote I said that I hadn't thought about using wordcode files for a
package concept and that the above was just a quick thought...

I don't plan to think much more about the package stuff now, there are 
other things higher on my lsit, so only another quick thought: we
could enhance the wordcode file format to allow user's to store extra
information for each function...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* RE: Wordcode files and compinit
  2000-03-14 10:40 Sven Wischnowsky
@ 2000-03-24 11:31 ` Andrej Borsenkow
  0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 2000-03-24 11:31 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

>
> Hm. The wordcode files already store the complete pathnames used when
> calling zcompile. That could be changed to prepend $PWD to names not
> starting with a slash. Then we could change the patch for
> `autoload -w'
> to make `autoload -w foo.zwc a b c' mark only a, b and c for
> autoloading. And then we could make `autoload -mw foo.zwc
> "*/Completion/Debian/*"'
> mark only those functions for autoloading.
>

This won't help in case of completion. We need the information from
comments and comments are lost when compiling zsh code. With current way
completion is initialized, functions must be present in source form. I
am not happy about it. Keeping two form of the same function always
increases the possibility of two getting out of sync.

-andrej


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

* Re: Wordcode files and compinit
@ 2000-03-14 10:40 Sven Wischnowsky
  2000-03-24 11:31 ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-03-14 10:40 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> I understand, for compinit to work I still need to have both source and compiled versions
> of completion functions? Some vague idea (probably, a step toward a "real" packaging) - we
> already keep quite a lot of information in wordcode files. What about adding a bit more -
> general "package name" (package id or how it can be called) and per-package specific
> information.
> 
> This would allow you to select package functions you want to load, and compinit could
> extract the same info as currently from comment. Something like
> 
> autoload -P completion
> 
> would add all completion functions but not zftp functions. That will still allow you to
> install everything by default but select just what is needed.
> 
> Of course, package name may be hierarchical ... completion/Debian :-)

Just a quick thought...

Hm. The wordcode files already store the complete pathnames used when
calling zcompile. That could be changed to prepend $PWD to names not
starting with a slash. Then we could change the patch for `autoload -w'
to make `autoload -w foo.zwc a b c' mark only a, b and c for
autoloading. And then we could make `autoload -mw foo.zwc "*/Completion/Debian/*"'
mark only those functions for autoloading.

I confess that I hadn't thought about combining wordcode files with a
package concept, although this now looks like a rather obvious idea...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* Wordcode files and compinit
@ 2000-03-14 10:30 Andrej Borsenkow
  0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 2000-03-14 10:30 UTC (permalink / raw)
  To: ZSH workers mailing list

I understand, for compinit to work I still need to have both source and compiled versions
of completion functions? Some vague idea (probably, a step toward a "real" packaging) - we
already keep quite a lot of information in wordcode files. What about adding a bit more -
general "package name" (package id or how it can be called) and per-package specific
information.

This would allow you to select package functions you want to load, and compinit could
extract the same info as currently from comment. Something like

autoload -P completion

would add all completion functions but not zftp functions. That will still allow you to
install everything by default but select just what is needed.

Of course, package name may be hierarchical ... completion/Debian :-)

-andrej

Have a nice DOS!
B >>


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

end of thread, other threads:[~2000-03-24 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-24 12:05 Wordcode files and compinit Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-03-14 10:40 Sven Wischnowsky
2000-03-24 11:31 ` Andrej Borsenkow
2000-03-14 10:30 Andrej Borsenkow

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).