#344 Current version numbering is broken

feature_request
closed
None
1
2015-03-04
2013-10-17
No

The recent version renumbering fails according to Perl rules for forwards compatibility:

$ perl -Ilocal/lib/perl5/ -MPDL -e 'print "$PDL::VERSION\n"'
2.007
$ perl -Ilocal/lib/perl5/ -e 'use PDL 2.007'
$ perl -Ilocal/lib/perl5/ -e 'use PDL 2.2'
PDL version 2.2 required--this is only version 2.007 at -e line 1.

1 Attachments

Discussion

  • Geir Aalberg

    Geir Aalberg - 2013-10-17

    As a sidenote, this has been a problem for the developers of PDL::NetCDF who have been required to remove PDL from the list of requirements (although it obviously is required) from 4.18 onwards, which can obviously cause installation problems:

    # 'PREREQ_PM' => { PDL => 2.2 }, # At request of Hernan De Angelis, 9/16/2013. Due to renumbering of PDL.

    http://cpansearch.perl.org/src/DHUNT/PDL-NetCDF-4.18/Makefile.PL

     
    Last edit: Geir Aalberg 2013-10-17
  • Chris Marshall

    Chris Marshall - 2013-10-17
    • status: open --> closed-postponed
    • assigned_to: Chris Marshall
    • Group: critical --> feature_request
    • Priority: 5 --> 1
     
  • Chris Marshall

    Chris Marshall - 2013-10-17

    This change in numbering scheme was precisely to address the fact
    that PDL releases have used both dotted decimals and floating point
    version numbers in an inconsistent and out-of-order way. Unfortunately,
    the PDL-2.2 release should have been PDL-2.2.0.

    How far back does PDL::NetCDF need to support PDL? There is no PDL-2.2
    on CPAN and all the extant versions are less than 2.007 (now). You should
    be able to find a number different from 2.2 with which to specify your pre-requisites.

    If that is not possible (i.e., you actually need to run with PDL-2.2)
    then the problem with PDL-2.2 will be definitely be resolved when the
    PDL3 release comes out within the next couple of years.

     
  • Chris Marshall

    Chris Marshall - 2013-10-17
    • status: closed-postponed --> open-remind
     
  • Chris Marshall

    Chris Marshall - 2013-10-17

    Want this to be open until the issue is resolved with PDL::NetCDF.

     
  • Geir Aalberg

    Geir Aalberg - 2013-10-18

    I think you misunderstand the problem. PDL::NetCDF (pre-4.18) requires PDL 2.2 or later, and runs fine with the current version once you remove the requirement.

    The rule when installing dependencies from CPAN is to always download and install the current version, which for PDL is 2.007. The PDL::NetCDF installer will then check the version of the freshly installed PDL and determine it is too old:

    Found PDL 2.007 which doesn't satisfy 2.2.
    ! Installing the dependencies failed: Installed version (2.007) of PDL is not in range '2.2'

    This is not a problem specific to PDL::NetCDF (which has partly solved it with a hack). ANY module that depends on PDL 2.2 or later will FAIL with PDL 2.007 because 2.001 < 2.2. There are as I can see only two solutions:

    1. Bump your version number to 2.3, or use three-part version numbers.

    2. Get every dependent module on CPAN to change their requirement from PDL 2.2 to 2.007. That means the 2.2 version will always satisfy the requirement, and will make it impossible to rely on features only present in 2.007 onwards.

     
  • Chris Marshall

    Chris Marshall - 2013-10-18

    On Fri, Oct 18, 2013 at 4:45 AM, Geir Aalberg geira@users.sf.net wrote:

    I think you misunderstand the problem. PDL::NetCDF (pre-4.18) requires PDL
    2.2 or later, and runs fine with the current version once you remove the
    requirement.

    The problem is understood.

    The rule when installing dependencies from CPAN is to always download and
    install the current version, which for PDL is 2.007. The PDL::NetCDF
    installer will then check the version of the freshly installed PDL and
    determine it is too old:

    Yes.

    Found PDL 2.007 which doesn't satisfy 2.2.
    ! Installing the dependencies failed: Installed version (2.007) of PDL is
    not in range '2.2'

    Yes.

    This is not a problem specific to PDL::NetCDF (which has partly solved it
    with a hack). ANY module that depends on PDL 2.2 or later will FAIL with PDL
    2.007 because 2.001 < 2.2. There are as I can see only two solutions:

    As all current CPAN versions are in-order with the current
    version numbering, the current recommendation is to replace
    the out-of-order version requirement with one consistent with
    the PDL distributions since 2002. Those all are numerically
    greater than 2.003001 in the floating point format.

    Bump your version number to 2.3, or use three-part version numbers.

    Get every dependent module on CPAN to change their requirement from PDL 2.2
    to 2.007. That means the 2.2 version will always satisfy the requirement,
    and will make it impossible to rely on features only present in 2.007
    onwards.

    The recommendation is to replace a requirement on PDL
    releases prior to 2.3.1 (i.e., 2.003001) by just 0 since all
    current CPAN releases satisfy that requirement.

     
    • Chris Marshall

      Chris Marshall - 2013-10-18

      Making a note to add this to the PDL::FAQ as well.

       
  • Chris Marshall

    Chris Marshall - 2014-02-25

    The PDL::NetCDF module has been updated to correct the version check problem and FAQ entry "Q: 3.4 How can PDL-2.2 be older than PDL-2.007?" has been added to explain the problem.

     
  • Chris Marshall

    Chris Marshall - 2014-02-25
    • status: open-remind --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks