default plugin path

Aaron Bentley aaron at aaronbentley.com
Tue Jan 27 02:43:10 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
>>> Any objections?
>> I object.  I don't think that is the right setting.  I don't think there
>> *is* a right setting that applies to all bzrlib clients.  Explicit
>> better than implicit.  Resist the temptation to guess.
> 
> I've never needed to alter the path. And any client that wants a
> specific path *can* alter it.

I have.  Both BundleBuggy and Launchpad have been bitten because bzrlib
is loading plugins from the system location.

>> I don't think clients should have to undo these settings.  I don't see a
>> need for this change, since you get the default path anyway if you call
>> load_plugins.
> 
> I don't want to call load_plugins. I want to 'import
> bzrlib.plugins.FOO'.

That's too much magic.

> That used to be - for a *long* time, so clearly not breaking bzrlib
> clients::
> import bzrlib.plugins.FOO
> 
> now it is
> import bzrlib.plugin
> bzrlib.plugin.set_plugins_path()
> import bzrlib.plugins.FOO

No, it's
import bzrlib.plugin
bzrlib.plugin.load_plugins()

> which is a dead chicken.

If you mean it's voodoo, I disagree.  It's reasonably easy to understand.

> What harmful effect will setting the path have?

It will cause bzrlib clients to load bzr plugins from the system path,
which will be incompatible with their local version of bzrlib.

Launchpad and Bundle Buggy have both been hit by bad default plugin
paths, even though Launchpad tried to control the plugin path.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl+dLsACgkQ0F+nu1YWqI0iyQCghbELrz0csAOPnBBYr+mgz8dE
DPoAn2hMt03pzr6J56rhaA0tReraaMrD
=4DFN
-----END PGP SIGNATURE-----



More information about the bazaar mailing list