Greetings all

With 0.70 out the door, I'd like to move to a new versioning system for Padre.

With the new plugin API compatibility code in, the current system
really doesn't work very well any more.

The API compat system is designed to work as follows.

1. Each module has a $VERSION, the same as the rest of Padre.
Currently, this is $VERSION = '0.70';

2. Each module that is activated for the compat system has a second
$BACKCOMPATIBLE value, which is the latest release with which the
current module is perfectly back-compatible with. This will be
different for each module. As an example, the core Padre::Plugin module
itself, which has been stable for some time and only had new methods added,
has $BACKCOMPATIBLE = '0.43';

3. Plugin authors record in their plugin the list of Padre classes
they use directly, and the last version of Padre they have tested
their plugin against. So a typical plugin might have the following
interface list.

sub padre_interfaces {
       'Padre::Plugin'     => 0.64,
       'Padre::Util'       => 0.64,
       'Padre::DB'         => 0.64,
       'Padre::Wx'         => 0.64,
       'Padre::Wx::Dialog' => 0.64,
}

When the plugin is loaded, each module is checked to make sure it is
less than or equal to $VERSION, and greater than or equal to
$BACKCOMPATIBLE.

This mechanism makes sure that plugins are automatically disabled if
you upgrade your Padre, and that the plugins are ONLY disabled when
one particular class they depend on changes. It also makes sure that
new versions of plugins aren't used on old versions of Padre.

The problem we have now is that if we change a Padre API, you can't
set the versions properly.

I'd need to set $BACKCOMPATIBLE = '0.71'; but I won't be allowed to move
$VERSION from '0.70' until the release.

Further, plugin authors can't upgrade their plugins in advance in svn
before the Padre release, so they can release plugin updates as soon
as possible after the main Padre release.

To fix this, I'd like to propose the following.

Padre moves to an odd and even version system.

When we are in a development cycle, the Padre $VERSION moves to 0.71.
Updates to APIs can be done straight away, because we can set $VERSION
= '0.71' and $BACKCOMPATIBLE = '0.71' legally. Plugins that are
updating against trunk can also set that version as well.

sub padre_interfaces {
   'Padre::Plugin' => 0.71,
}

Plugin will then automatically disable the plugin if someone tries to
use the svn
plugin against the production 0.70 padre, and if you system install the dev
version early, any out of date plugins will be disabled.

After the development cycle is finished, we move ahead to an even number for the
release itself

So in production Padre $VERSION = '0.72' and $BACKCOMPATIBLE = '0.71', all the
dev plugins work still, all the pre-installed and out of date plugins
disable correctly.

I'd like to start this straight away, unless anyone has any objections
to this mechanism.

Adam K
_______________________________________________
Padre-dev mailing list
Padre-dev@perlide.org
http://mail.perlide.org/mailman/listinfo/padre-dev

Reply via email to