[dancer-users] Re : dancer_major_version

Damien Krotkine dkrotkine at gmail.com
Wed Dec 26 17:24:31 GMT 2012



Le mercredi 26 décembre 2012 à 17:45, David Golden a écrit :

> Basically, Dancer and plugins are doing version numbers and version
> number comparison wrong. Yes, I am an authority on this. ;-)
>  
>  

We believe you ! :)  
>  
> My suggestion, given the current state of affairs, is that
> dancer_version in the 1.999_XX dev series should be hardcoded to 2 in
> advance of the actual 2.0 release. If you want to be fancy, something
> like this:
>  
> sub dancer_version { Dancer->VERSION lt 2 ? 2 : Dancer->VERSION }
>  
> That decouples the version that plugins see from the module versioning.

That's a good idea. Looking at the current code in Dancer.pm  I don't understand the code of the VERSION method anyway :) I think sukria agrees to remove the API version thingy. There is also an API version in App.pm that should be removed. And dancer_api_version should go away imho, as I doesn't exist in dancer 1 DSL.  


>  
> David
>  
> On Tue, Dec 25, 2012 at 5:59 PM, damien krotkine <dkrotkine at gmail.com> wrote:
> >  
> > Hi,
> >  
> > As I understand, Alexis did a dev release of dancer2. The version is
> > 1.9999_01 or something like that.
> >  
> > People and plugins currently uses int(dancer_version) to discover if it's
> > running under Dancer 1 or Dancer 2.
> >  
> > int(1.0000_01) emits a warnings, so to work around that, a ne keyword has
> > been added :
> >  
> > dancer_major_version, which returns what's on the left of the dot in the
> > version number.
> >  
> > Fine, except that :
> > - this keyword has not been added to Dancer v1, so plugins using
> > dancer_major_version will break under Dancer 1
> > - no advertizing has been made on to what plugins should use (ie continue
> > using int() or use the new keyword)
> >  
> > What's the best solution ?
> >  
> > In my opinion we can :
> > 1/ Release a new Dancer 1, and ask people to use dancer_major_version and
> > require the latest Dancer 1 release (or Dancer 2) : long and cumbersome as
> > we need to potentially modify plugins and contact users and so all
> >  
> > 2/ remove dancer_major_version, and change dancer_version so that it returns
> > the version without the _xx at the end. Simple, doesn't need to release D1
> > again, and nothing to change in plugins.
> >  
> > 3/ any idea ?
> >  
> > As you may guess, I'm a big fan of solution 2. If you all agree (especially
> > sukria, as he added dancer_major_version, and maybe he had an other reasons
> > for that), I can make the change.
> >  
> > In my opinion, the longer we stay in the current situation
> > (dancer_major_version only in D2), the more dangerous it is
> >  
> > dams.
> >  
> >  
> >  
> > _______________________________________________
> > dancer-users mailing list
> > dancer-users at dancer.pm
> > http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
> >  
>  
>  
>  
>  
> --  
> David Golden <xdg at xdg.me>
> Take back your inbox! → http://www.bunchmail.com/
> Twitter/IRC: @xdg
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20121226/818403f4/attachment.htm>


More information about the dancer-users mailing list