Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Checking if your CPAN distributions need to bump their prereq versions

by Tux (Canon)
on Jun 27, 2017 at 06:28 UTC ( [id://1193656]=note: print w/replies, xml ) Need Help??


in reply to Checking if your CPAN distributions need to bump their prereq versions

potentially useful. Thoughtlessly upping the prereq versions /might/ work for you, but it may also break a lot. Imagine installed Foo::Bar version 1.81, which passes all your tests and everything works smoothly. Then F;;OOBar gets updated to Foo::Bar 2.00 with a complete new API and tons of new shiny features that users have asker for over the last decade (e.g. after someone else took over maintenance and finaly resolved all open RT tickets gathered during that unmaintained decade). Now you required a version 2.00, as it is available, but you never tested all your stuff with that version.

In an ideal developer world, you'd have a machine that (automatically) installs ever update and then tests all your own (unpublished) modules against those. Only after the tests PASS, you up the prereq version. And if there are circular deps, you'd probably have to go through that cycle a few times.

Just my 2 € for today


Enjoy, Have FUN! H.Merijn
  • Comment on Re: Checking if your CPAN distributions need to bump their prereq versions

Replies are listed 'Best First'.
Re^2: Checking if your CPAN distributions need to bump their prereq versions
by stevieb (Canon) on Jun 27, 2017 at 12:28 UTC

    Hi Tux,

    Indeed, I do exactly this with my own modules, which is why the default of this software is to show only one's own dependencies.

    I test my modules along with all of their reverse dependencies with another software I wrote, Test::BrewBuild. It has the capabilities built-in to spin up new perlbrew instances for each test, ensure my distributions still pass, then tests any/all distributions on the CPAN that use my distributions as well.

    This ensures that changes I've made don't break anything anywhere else.

      To elaborate...

      cd ~/repos/mock-sub git pull # make changes, perhaps bumping one of my # own prereq versions

      My Test::BrewBuild software does a lot of things, but a basic run is started out of the current working directory, and runs unit tests of itself and optionally as in the case below, runs all the unit tests of all reverse dependencies against the changed version of the distribution I'm planning on uploading to the CPAN against any and/or all installed versions of Perlbrew (and Berrybrew) perls (you can also remove them all and install any number of them from scratch to have a clean slate for every test if you want). I won't bother getting into the network dispatching capabilities, or the automation aspects.

      Here's an example after a random change that clearly broke things for some of the revdeps:

      brewbuild -R reverse dependencies: RPi::DigiPot::MCP4XXXX Devel::Examine::Subs PSGI::Hector App::RPi::EnvUI File::Edit::Portable Devel::Trace::Subs RPi::DigiPot::MCP4XXXX 5.10.1 :: PASS 5.18.4 :: PASS 5.20.3 :: PASS 5.24.1 :: PASS 5.26.0 :: PASS Devel::Examine::Subs 5.10.1 :: PASS 5.18.4 :: PASS 5.20.3 :: PASS 5.24.1 :: PASS 5.26.0 :: FAIL PSGI::Hector 5.10.1 :: PASS 5.18.4 :: PASS 5.20.3 :: PASS 5.24.1 :: PASS 5.26.0 :: FAIL App::RPi::EnvUI 5.10.1 :: FAIL 5.18.4 :: FAIL 5.20.3 :: FAIL 5.24.1 :: FAIL 5.26.0 :: FAIL File::Edit::Portable 5.10.1 :: PASS 5.18.4 :: PASS 5.20.3 :: PASS 5.24.1 :: PASS 5.26.0 :: PASS Devel::Trace::Subs 5.10.1 :: PASS 5.18.4 :: PASS 5.20.3 :: PASS 5.24.1 :: PASS 5.26.0 :: FAIL

      Once all tests pass for all reverse dependencies, it's safe for me to upload the new version to CPAN.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193656]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-19 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found