better messages about bad plugin names

Bug #103023 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Dan Watkins

Bug Description

"Wichmann, Mats D" <email address hidden>
to bazaar

show details
  3:53 am (1 hour ago)

My first look at 0.15 wasn't terribly positive...

Unable to load plugin 'bzr-tags' from '/home/mats/.bazaar/plugins': It
is not a valid python module name.
Unable to load plugin 'bzr-gtk' from '/home/mats/.bazaar/plugins': It is
not a valid python module name.
Unable to load plugin 'pqm-submit' from '/home/mats/.bazaar/plugins': It
is not a valid python module name.
Unable to load plugin 'update-mirrors' from
'/home/mats/.bazaar/plugins': It is not a valid python module name.

The other plugins in my home directory are not
saying this.

What's up with this?

> >> I'm expecting people will go to the plugins page, do the
> >> branch using the link provided, and then get funky errors.
> >> Should plugin authors be renaming stuff now?

I think you're right. So what could we do to make this more obvious?

Really the 0.15 NEWS should have mentioned this under the heading of
'NOTES WHEN UPGRADING'; in the shipped version it does describe this
but not in a way that would let users understand why it broke or what
should have been done. For any change we should consider whether it
should be mentioned in NEWS and how - what the consequences to users
are.

   * Allow 'import bzrlib.plugins.NAME' to work when the plugin NAME has not
     yet been loaded by load_plugins(). This allows plugins to depend on each
     other for code reuse without requiring users to perform file-renaming
     gymnastics. (Robert Collins)

However that's moot because most users don't read most documentation. :-)

It would be better if the error said something like

 Can't load ~/.bazaar/plugins/bzr-gtk as a plugin because this isn't
a valid module name; try renaming it to bzr_gtk

through a simple substitution.

> There is also the fact that you wouldn't usually name the trunk/mainline
> as the project name. (for example
> http://bazaar.launchpad.net/~bzr/bzr-cvsps-import/trunk
> )
>
> Because of this, the recommended way of branching is to always supply a
> target name. Otherwise you would end up with 10 'trunk' projects.

Maybe that page should give the whole command you need to use to install it?

 bzr branch http://aouthaoenuth/bzr-foo/trunk ~/.bazaar/plugins/bzr_foo

Or we could have an install-plugin command as shorthand...

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

Still current in 0.91dev.

Changed in bzr:
importance: Undecided → Low
status: New → Triaged
Dan Watkins (oddbloke)
Changed in bzr:
assignee: nobody → daniel-thewatkins
status: Triaged → In Progress
Revision history for this message
Dan Watkins (oddbloke) wrote :

r2984 of bzr.dev.

Changed in bzr:
milestone: none → 1.0rc1
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.