[RFC] bzr help plugin-name

Robert Collins robertc at robertcollins.net
Mon Jun 26 10:44:12 BST 2006


On Mon, 2006-06-19 at 11:15 -0500, John Arbash Meinel wrote:
> Robert Collins wrote:


> And on my system it is called:
> bzrlib.plugins.bzrtools-baz2bzr.shelf
> 
> Yes, most people just use the name of the branch that was given to them.
>  But there is no restriction that the name on disk be anything that even
> resembles a valid python identifier.

I consider it a bug that there is no such restriction: unless the module
has a predictable name there is no way for plugin A to incorporate code
from plugin B, and that means that plugins are second class citizens as
far as the bzr code base behaves. This means that there is much more
pressure for code to go into the mainline that there needs to be.

> I'm advocating that we change the importer to check the plugin for its
> 'canonical' name, and preferentially use that. So if I install
> 'bzrtools-from-lifeless', it would try to install itself as:
> bzrlib.plugins.bzrtools.
> 
> (And maybe also as bzrlib.plugins.'bzrtools-lifeless')
>
> More importantly, people can use naming to force an import order, which
> I think is a good thing. But would mean that none of the plugin names
> could be found in the bzrlib.plugins.* namespace. Which breaks the
> webserve plugin/cgi.

I think its *much* more understandable and predictable if the disk name
is the python name, and there is an expected disk name for each plugin.

This is how all python programs work.

I'm currently -2 on anything that looks or feels different than python
modules here.

I think we can solve your problems quite easily with an import hook.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060626/a87af2bc/attachment.pgp 


More information about the bazaar mailing list