Giter Club home page Giter Club logo

p5-dist-backcompat's Introduction

NAME

README for Perl library Perl5-Dist-Backcompat

USAGE

Use perldoc to read documentation for module Perl5::Dist::Backcompat and executable program p5-dist-backcompat.

DESCRIPTION

As of January 2022, there are 41 distributions (hereinafter, "distros") underneath dist/ in the Perl 5 core distribution. By definition, all of these are maintained by Perl 5 Porters in core but are potentially releasable to CPAN so that they may be installed against older perl releases. (To date, all but one of those 41 distros has had at least one CPAN release in the past.)

But if were to release the code in a given dist/ distro to CPAN today, would it build and test correctly against older perls? Which older perls? More to the point, suppose that we've made changes to the code in these distros in core since the last production release of perl? If we were to release that code to CPAN, would that code fail against older versions of perl?

This program, p5-dist-backcompat, tries to answer those questions. It aims to be a P5P core development tool which, when run in advance of a development, production or maintenance release of perl, can alert a release manager or core developer to potential problems as described above.

Terminology

Every one of the dist/ distros has its own history, quirks and coding challenges. So within this program we will use certain terminology to group distros that share certain characteristics.

Distribution/Distro

These terms will be used in two senses:

  • In Perl 5 Core Distribution

    A directory tree underneath dist/ in the Perl 5 core distribution. If the directory has a multipart name, it is spelled Some-Distro (as distinct from the Some::Distro spelling used for packages or modules within that distribution.

  • CPAN Release

    A release to CPAN of code from a given distro within the core distribution.

CPAN Viability

Setting aside metadata files like META.json, META.yml and Changes, if we were to take the code for a given dist/ distro as it stands today, added a Makefile.PL as needed (see next section), rolled it up into a tarball and uploaded that tarball to CPAN, how would that CPAN release fare on CPANtesters against older versions of perl?

If such a release required a lot of fine-tuning in order to get PASSes on CPANtesters, then we would say it has low direct CPAN viability.

If such a release required little fine-tuning to get those PASSes, then we would say it has high direct CPAN viability.

The CPAN release version of a distro may need fine-tuning for reasons such as:

  • To work with changes in Perl syntax over the years.
  • To install prerequisites not available in older versions of perl.
  • To hold test files not needed within the core distribution, such as author-only tests to be run by the person doing the CPAN release.

Makefile.PL Status

When any of these dist/ distros gets a CPAN release, it needs to have a Makefile.PL so that ExtUtils::MakeMaker can generated a Makefile. The Makefile is in turn run by make. But that doesn't mean that a given dist/ distro has a Makefile.PL of its own within the core distribution. As of today we can classify these distros according to the following statuses:

  • unreleased

    This kind of dist/ distro has apparently never had a CPAN release, so it has never needed a Makefile.PL for that purpose and doesn't have one in core. p5-dist-backcompat ignores such distros; as of date there is only 1 such distro.

  • cpan

    This kind of dist/ distro may or may not have a Makefile.PL of its own in the core distribution -- neither native nor generated. Hence, when released to CPAN, the CPAN maintainer has to provide an appropriately coded Makefile.PL as part of the tarball. The current version of this program, p5-dist-backcompat, always uses the CPAN version of a distro's Makefile.PL.

p5-dist-backcompat's People

Contributors

jkeenan avatar

Watchers

 avatar  avatar

p5-dist-backcompat's Issues

metadata not found after installation from CPAN

If I install a perl, then install Perl5::Dist::Backcompat from CPAN against it, I have something like this:

~/testing/blead/bin/p5-dist-backcompat
~/testing/blead/lib/perl5/site_perl/5.35.9/Perl5/Dist/Backcompat.pm

The metadata files in the repository don't get installed.

$ pwd
~/gitwork/p5-dist-backcompat
$ $ ls etc/dist-backcompat*.txt |cat
etc/dist-backcompat-distro-metadata.txt
etc/dist-backcompat-older-perls.txt

But two of these files are opened for reading in the module.

$ cd ~/gitwork/p5-dist-backcompat
$ find . -type f | xargs grep -n 'dist-backcompat-'
...
./lib/Perl5/Dist/Backcompat.pm:184:        '.', 'etc', 'dist-backcompat-distro-metadata.txt');
./lib/Perl5/Dist/Backcompat.pm:216:        '.', 'etc', 'dist-backcompat-older-perls.txt');

Hence, the architecture of the module is fundamentally flawed.

Possible workaround(s):

  • Convert those two files into .pm files and use them in Perl5::Dist::Backcompat.

  • Have the metadata in those two files read by p5-dist-backcompat or any calling program (e.g., t/*.t).

    • This may require additional command-line switches for the calling program which provide paths to these metadata files.

Metadata files: inline comments are out-of-date

In two of the metadata files, we refer to the front-end program as Porting/dist-backcompat.pl.

==> etc/dist-backcompat-distro-metadata.txt <==
# dist-backcompat-distro-metadata.txt

# This file holds configuration data for Porting/dist-backcompat.pl.  Blank or
# all-whitespace lines are ignored.  Lines starting with a '#' are comments
# and are also ignored.

# There should be one entry in this file for each distribution ("distro")
# underneath 'dist/' in the Perl 5 core distribution which has had a separate
# release to CPAN.*


==> etc/dist-backcompat-older-perls.txt <==
# Porting/dist-backcompat-older-perls.txt

# This file holds configuration data for Porting/dist-backcompat.pl.  Blank or

This reflects an earlier stage of development of this application when it was being thought of as a Porting/ program within the Perl 5 core distribution. This is no longer the case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.