google/maktaba — pull request #44 by dbarnett (2014-01-24 08:45:15+00:00)
Title: Respect plugin name from addon-info.json

For plugins that have an addon-info.json and declare the "name" field, use that as the plugin name, regardless of the directory name the plugin code is sitting in. (#43)

Also special case symlinked plugins that don't declare an explicit name. These could be registered with the symlink name by an explicit call to `maktaba#plugin#Install` and then subsequently registered with the resolved directory name by `maktaba#plugin#Enter()`. Now the resolved dir is stored as an alias to the same plugin, so it will never be registered as a separate plugin. (This can definitely still be tripped up if you're trying hard enough, so if you care about plugin names staying consistent, make sure you include an explicit "name" in addon-info.json for your plugins.)

Now the code always checks addon-info.json for each plugin at registration, which involves some overhead but only made a slight difference when I timed it. At least it's warming up the cache.