GoogleCodeArchives / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

Bundled plugin eggs are loaded instead of development mode plugins #369

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

Today I have ran into an issue regarding development mode plugin loading.
Althought I have all plugins from svn installed in devel mode, eggs from
plugins folder were picked up instead of source code.
To investigate an issue I have put some logging in plugin manager (see
patch pkg-distslog.patch) and the outcome was:

[23:35:09][pluginmgr][info] Found plugin: codebrowser
[23:35:09][pluginmgr][info] Setuptools dists = [CodeBrowser 0.8
(/home/igor/1st/Nauka/Doktorat/Editra/Editra-svn-hg/plugins/CodeBrowser-0.8-py2.
6.egg),
CodeBrowser 0.8
(/home/igor/1st/Nauka/Doktorat/Editra/Editra-svn-hg/plugins/codebrowser)]

So, egg bundle was first in the list. The problem is that both are the same
version.
After changing the version of codebrowser to 0.9-dev in setup.py and
reinstalling in devel mode everything works as expected and the source
version is picked up first.

[23:53:57][pluginmgr][info] Found plugin: codebrowser
[23:53:57][pluginmgr][info] Setuptools dists = [CodeBrowser 0.9-dev
(/home/igor/1st/Nauka/Doktorat/Editra/Editra-svn-hg/plugins/codebrowser),
CodeBrowser 0.8
(/home/igor/1st/Nauka/Doktorat/Editra/Editra-svn-hg/plugins/CodeBrowser-0.8-py2.
6.egg)]

The weird thing is that it used to work without problems and it stoped
working today after some cleanup and folder reorganization.
Looking at pkg_resources code I see that the dists sort order is location
dependent so this could be one logical explanation but I'm not completely sure.

I suggest that we put the next release version + dev for every bundled
plugin source so that plugins installed in devel mode will always be loaded
instead of egg bundled ones.

Igor

Original issue reported on code.google.com by igor.dejanovic@gmail.com on 1 Jun 2009 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
I have seen this at seeming random times in the past as well.

Just to be clear are you suggesting that:

1) Do a release (i.e version 0.2)

2) Then right after change the setup file to 0.2-dev untill version 0.3 is 
ready for
release.

Cody

Original comment by CodyPrec...@gmail.com on 2 Jun 2009 at 2:08

GoogleCodeExporter commented 9 years ago
Yes, but after 0.2 release change would be to 0.3-dev (not 0.2-dev). Version 0.3
would be in devel stage until next release 0.3
This will ensure that devel plugin is founded first no matter what release 
version is
installed, and no matter what location.

Another suggestion would be to read plugin version in plugin dlg from plugin
distribution instead of module level __version__ attribute. This will eliminate
confusion that happens when version in setup.py increments but __version__ is
forgotten to be updated so plugin dlg lists plugins as being old versions.

Igor

Original comment by igor.dejanovic@gmail.com on 2 Jun 2009 at 5:56

GoogleCodeExporter commented 9 years ago
Ok that makes sense.

Yea it would be good to be able to get rid of the need for that __version__ 
attribute
in each plugins __init__ module.

cody

Original comment by CodyPrec...@gmail.com on 2 Jun 2009 at 6:00

GoogleCodeExporter commented 9 years ago

Original comment by CodyPrec...@gmail.com on 4 Jun 2009 at 11:42

GoogleCodeExporter commented 9 years ago
version checking change is done. waiting for wxwidgets.org to come back online 
to
checkin.

Original comment by CodyPrec...@gmail.com on 10 Jun 2009 at 12:51

GoogleCodeExporter commented 9 years ago
Plugin module change done. Plugin dialog will now get version and name info 
from the
distro object and not the plugin module.

Will start removing this value from the modules in future releases.

Will start with new version naming scheme after next release of each plugin.

Original comment by CodyPrec...@gmail.com on 11 Jun 2009 at 11:35