greetings monks,

I've run into a hairy situation involving module versioning, ExtUtils::MakeMaker, and cpantesters about which I'd greatly appreciate some advice.

The situation:
I have several modules on CPAN, some of which depend on others. In particular, PDL::Ngrams uses PDL::VectorValued both at runtime and compile-time macros. Both of these modules are PDL packages using (generated) XS via PDL::PP and requiring a current and common version of PDL installed (for compiling & linking).

Desiderata:

  1. I would like the PDL::VectorValued sub-packages to share the same $VERSION, declaring it once and only once. Currently, I've put the declaration in a specialized file, PDL/VectorValued/Version.pm (which doesn't itself require PDL). The only other option afaik is the PDL::PP-generated PDL/VectorValued/Utils.pm, but that can't reasonably be used to set $PDL::VectorValued::Dev::VERSION (see (3)).
  2. I want to be able to specify dependencies in e.g. PDL-Ngrams/Makefile.PL so that CPAN and ExtUtils::MakeMaker parse them correctly. At the moment, that means specifying PREREQ_PM => { ..., 'PDL::VectorValued::Version' => ... } in PDL-Ngrams/Makefile.PL
  3. I need to be able to use 1 PDL::VectorValued sub-package (PDL::VectorValued::Dev) when building PDL::VectorValued::Utils itself (obviously this doesn't require PDL::VectorValued or PDL::VectorValued::Utils), but it makes it difficult to share $VERSION without a dedicated file.

The Problem:
cpan smokers choke: systems reporting near-identical configurations aren't testing identically; compare e.g. this PASS report with this FAIL. Both systems report themselves as "perl v5.22.0, GNU/Linux, 3.16.0-4-amd64, x86_64-linux-thread-multi", both running PDL-2.014, yet the one fails with a "PDL::VectorValued::Utils needs to be recompiled against the newly installed PDL" message during testing, while the other succeeds.

The error message is quite probably correct and would be helpful to a human: I'm assuming the FAILing smoker's machine has an old version of PDL::VectorValued installed which didn't get re-compiled when PDL-2.014 was released, built, and tested on the smoker. The inconsistency didn't get caught when evaluating PDL-Ngrams/Makefile.PL because its PREREQ_PM specifies the PDL-free PDL::VectorValued::Version as the dependency target. Uploading a new version of PDL::VectorValued whenever a new PDL version is released would probably trick smokers into testing with a consistent setup, but shouldn't be necessary since in this case (as in most others to date), no PDL::VectorValued code changes were required for the new PDL release.

A (suboptimal) workaround:
After tearing out some hair and posting to the pdl-devel list, I followed a suggestion offered there to manually check for a current "safe" version of PDL::VectorValued in PDL-Ngrams/Makefile.PL myself. This results in "UNKNOWN" reports from the cpan smokers, which is preferable to "FAIL", but still pretty unsatisfying. I'm unsure whether "NA" would be any better, since this situation doesn't seem to jive with the canonical conditions for either of those categories.

The wisdom I seek:
Can anyone suggest a configuration which would allow me to realize desiderata (1)-(3) in a manner which is more palatable to CPAN smokers than the current hacks? I suppose I can live without $PDL::VectorValued::Dev::VERSION for desideratum (1) if need be, but I'd like to avoid another hack (autoconf-style global macro replacement or some such) if possible, especially if it won't fix the bogus cpantesters reports. Alternately, is there an accepted procedure for this sort of issue? I've turned up similar questions in the context of linking to third-party libraries, but this case is "only" perl (XS) modules.

marmosets,
Bryan / moocow


In reply to cpan smokers, PREREQ_PM, and PDL dependency by moocow

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.