develooper Front page | perl.perl5.porters | Postings from February 2022

Challenges in CPAN Releases of 'dist/' Libraries (2 of 3)

Thread Next
From:
James E Keenan
Date:
February 22, 2022 21:57
Subject:
Challenges in CPAN Releases of 'dist/' Libraries (2 of 3)
Message ID:
ea14db52-e5c3-8233-c407-86286b745e45@pobox.com
In a recent post 
(https://www.nntp.perl.org/group/perl.perl5.porters/2022/02/msg262954.html) 
I discussed the problems we may face when we go to do CPAN releases of 
the libraries maintained by Perl 5 Porters underneath the 'dist/' 
directory in the core distribution.

I have hacked together a CPAN library, Perl5::Dist::Backcompat 
(https://metacpan.org/pod/Perl5::Dist::Backcompat), and a front-end 
tool, p5-dist-backcompat 
(https://metacpan.org/release/JKEENAN/Perl5-Dist-Backcompat-0.10/source/scripts/p5-dist-backcompat), 
which generate data which can useful in evaluating the "CPAN 
releasability" of a given 'dist/' distribution.

Here are two examples of the data which this tool generates.

#####
Storable
{
   "5.006002" => { a => "perl5.6.2", configure => undef, make => undef, 
test => undef },
   "5.008009" => { a => "perl5.8.9", configure => undef, make => undef, 
test => undef },
   "5.010001" => { a => "perl5.10.1", configure => 1, make => 1, test => 
1 },
   "5.012005" => { a => "perl5.12.5", configure => 1, make => 1, test => 
1 },
   "5.014004" => { a => "perl5.14.4", configure => 1, make => 1, test => 
1 },
   "5.016003" => { a => "perl5.16.3", configure => 1, make => 1, test => 
1 },
   "5.018004" => { a => "perl5.18.4", configure => 1, make => 1, test => 
1 },
   "5.020003" => { a => "perl5.20.3", configure => 1, make => 1, test => 
1 },
   "5.022004" => { a => "perl5.22.4", configure => 1, make => 1, test => 
1 },
   "5.024004" => { a => "perl5.24.4", configure => 1, make => 1, test => 
1 },
   "5.026003" => { a => "perl5.26.3", configure => 1, make => 1, test => 
1 },
   "5.028003" => { a => "perl5.28.3", configure => 1, make => 1, test => 
1 },
   "5.030003" => { a => "perl5.30.3", configure => 1, make => 1, test => 
1 },
   "5.032001" => { a => "perl5.32.1", configure => 1, make => 1, test => 
1 },
   "5.034000" => { a => "perl5.34.0", configure => 1, make => 1, test => 
1 },
}
#####

This data suggests that if we were to attempt a CPAN release of Storable 
using the source code currently found in blead but with other files as 
found in the current CPAN release, Storable's Makefile.PL would fail to 
complete in perl-5.6.2 and perl-5.8.9.  Neither 'make' nor 'make test' 
would be attempted on those versions.  However, Storable would build and 
test properly on all subsequent production releases.

The person doing a CPAN release would have to determine what 
workarounds, patches, etc., are desirable for those two very old 
versions of perl.

#####
PathTools
{
   "5.006002" => { a => "perl5.6.2", configure => 1, make => 1, test => 0 },
   "5.008009" => { a => "perl5.8.9", configure => 1, make => 1, test => 0 },
   "5.010001" => { a => "perl5.10.1", configure => 1, make => 1, test => 
0 },
   "5.012005" => { a => "perl5.12.5", configure => 1, make => 1, test => 
0 },
   "5.014004" => { a => "perl5.14.4", configure => 1, make => 1, test => 
0 },
   "5.016003" => { a => "perl5.16.3", configure => 1, make => 1, test => 
0 },
   "5.018004" => { a => "perl5.18.4", configure => 1, make => 1, test => 
0 },
   "5.020003" => { a => "perl5.20.3", configure => 1, make => 1, test => 
0 },
   "5.022004" => { a => "perl5.22.4", configure => 1, make => 1, test => 
0 },
   "5.024004" => { a => "perl5.24.4", configure => 1, make => 1, test => 
0 },
   "5.026003" => { a => "perl5.26.3", configure => 1, make => 1, test => 
0 },
   "5.028003" => { a => "perl5.28.3", configure => 1, make => 1, test => 
0 },
   "5.030003" => { a => "perl5.30.3", configure => 1, make => 1, test => 
0 },
   "5.032001" => { a => "perl5.32.1", configure => 1, make => 1, test => 
0 },
   "5.034000" => { a => "perl5.34.0", configure => 1, make => 1, test => 
1 },
}
#####

This data suggests that if we were to attempt a CPAN release of 
PathTools using the source code currently found in blead but with other 
files as found in the current CPAN release, PathTools would build 
successfully on all versions of perl but would pass its tests only on 
the most recent production release.

The person doing a CPAN release would first have to determine whether 
the 'test => 0' entries are false negatives created by limitations in 
the p5-dist-backcompat tool.  If they are true test failures, then we 
would have a serious problem doing a new CPAN release.  We'd have to 
investigate why the changes made in the perl-5.33 development cycle 
cause test failures for older perls.

I'm fairly confident that this tool does not produce false positives, 
i.e., it does not report 'dist/' distros as PASSing when they in fact 
fail at one of the three stages.  This tool does produce some false 
negatives, i.e., there are cases where the tool is not clever enough to 
accommodate the quirks of a particular distro's CPAN release, 
notwithstanding my attempts to give hints via configuration data.  In 
these cases distros which may in reality be simple to release to CPAN 
are shown as problematic.

In the third and final post in this series, I will provide my own 
evaluation of the challenges we will face on a per-distro basis.

Thank you very much.
Jim Keenan

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About