Skip Menu |

This queue is for tickets about the B-Generate CPAN distribution.

Report information
The Basics
Id: 70397
Status: resolved
Priority: 0/
Queue: B-Generate

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: B::Generate dep on B not enforced
Date: Sun, 21 Aug 2011 15:31:26 +0100
To: bug-B-Generate [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
B::Generate declares, at configure time, a dependency on B 1.09. However, at runtime it doesn't enforce this at all, so it's happy to run against an inadequate version of B. It would even pass its tests, but for a bug in the test suite. t/new_cv.t attempts to skip the entire test script if B has a version less than 1.09. However, after emitting the "1..0" line, it fails to exit. The test harness therefore sees that it ran 26 tests (which all pass with B 1.07 or 1.02) after planning 0, and fails it. Please decide whether B::Generate actually requires B 1.09. Enforce its true version requirement, and make version-dependent skipping operate correctly. -zefram
From: rurban [...] x-ray.at
Am So 21. Aug 2011, 10:31:37, zefram@fysh.org schrieb: Show quoted text
> B::Generate declares, at configure time, a dependency on B 1.09. > However, at runtime it doesn't enforce this at all, so it's happy to > run against an inadequate version of B. It would even pass its tests, > but for a bug in the test suite. > > t/new_cv.t attempts to skip the entire test script if B has a version less > than 1.09. However, after emitting the "1..0" line, it fails to exit. > The test harness therefore sees that it ran 26 tests (which all pass > with B 1.07 or 1.02) after planning 0, and fails it. > > Please decide whether B::Generate actually requires B 1.09. Enforce its > true version requirement, and make version-dependent skipping operate > correctly.
Oops, forgot the exit. Thanks. As the textcase says, B >=1.09 is required only for B::NEW_with_start, which is rarely used. But I better enforce a higher B as lower B's will fail generally and I do not support them.
I find the warning sufficient: $ perl5.8.5d-nt Makefile.PL Testing libperl export for pad_alloc ok Testing libperl export for cv_clone ok Testing libperl export for fold_constants ok Checking if your kit is complete... Looks good Warning: prerequisite B 1.09 not found. We have 1.02. Writing Makefile for B::Generate Writing MYMETA.yml and MYMETA.json $ make test ... t/new_cv.t ........ skipped: B::CV->NEW_with_start requires B 1.09 ... All tests successful. Files=8, Tests=23, 1 wallclock secs ( 0.07 usr 0.04 sys + 0.49 cusr 0.08 csys = 0.68 CPU) Result: PASS -- Reini Urban
Subject: Re: [rt.cpan.org #70397] B::Generate dep on B not enforced
Date: Thu, 20 Oct 2011 15:05:16 +0100
To: Reini Urban via RT <bug-B-Generate [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Reini Urban via RT wrote: Show quoted text
>I find the warning sufficient:
CPAN.pm does not find the warning sufficient. It will attempt to follow the dependency it describes, but if it fails to install the dependency then it will continue with building B::Generate. With the dependency being B, installing it will always fail, because the latest B is only in the core distro. So an attempt to install B::Generate through CPAN.pm, where B is insufficiently recent, will (now that you've fixed the test skip) install a B::Generate that doesn't work. Rather more people delegate module installation to CPAN.pm than delegate it to you. -zefram
Subject: Re: [rt.cpan.org #70397] B::Generate dep on B not enforced
Date: Thu, 20 Oct 2011 10:04:56 -0500
To: bug-B-Generate [...] rt.cpan.org
From: Reini Urban <rurban [...] x-ray.at>
On Thu, Oct 20, 2011 at 9:05 AM, Zefram via RT <bug-B-Generate@rt.cpan.org> wrote: Show quoted text
>       Queue: B-Generate >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70397 > > > Reini Urban via RT wrote:
>>I find the warning sufficient:
> > CPAN.pm does not find the warning sufficient.  It will attempt to follow > the dependency it describes, but if it fails to install the dependency > then it will continue with building B::Generate.  With the dependency > being B, installing it will always fail, because the latest B is only in > the core distro.  So an attempt to install B::Generate through CPAN.pm, > where B is insufficiently recent, will (now that you've fixed the test > skip) install a B::Generate that doesn't work. > > Rather more people delegate module installation to CPAN.pm than delegate > it to you.
I'm sorry, I forgot to mention. The new release 1.38 fixed it. (Skip the failing test on earlier perls) -- Reini
Subject: Re: [rt.cpan.org #70397] B::Generate dep on B not enforced
Date: Thu, 20 Oct 2011 16:09:27 +0100
To: Reini Urban via RT <bug-B-Generate [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Reini Urban via RT wrote: Show quoted text
>I'm sorry, I forgot to mention. >The new release 1.38 fixed it. (Skip the failing test on earlier perls)
Yes, I noticed that, and referred to it. You still have a mismatch between what B::Generate declares it requires up front (in Makefile.PL and META.yml) and what it declares it requires at runtime (in B/Generate.pm). Having made the test successfully skip means that now B::Generate will pass its tests despite its declared dependency not being met. Since B 1.09 is required for B::Generate to operate correctly, you should "use B 1.09;" in B/Generate.pm, and you should not skip that test. -zefram
Subject: Re: [rt.cpan.org #70397] B::Generate dep on B not enforced
Date: Thu, 20 Oct 2011 10:56:00 -0500
To: bug-B-Generate [...] rt.cpan.org
From: Reini Urban <rurban [...] x-ray.at>
On Thu, Oct 20, 2011 at 10:09 AM, Zefram via RT <bug-B-Generate@rt.cpan.org> wrote: Show quoted text
>       Queue: B-Generate >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70397 > > > Reini Urban via RT wrote:
>>I'm sorry, I forgot to mention. >>The new release 1.38 fixed it. (Skip the failing test on earlier perls)
> > Yes, I noticed that, and referred to it.  You still have a mismatch > between what B::Generate declares it requires up front (in Makefile.PL and > META.yml) and what it declares it requires at runtime (in B/Generate.pm). > Having made the test successfully skip means that now B::Generate will > pass its tests despite its declared dependency not being met. > > Since B 1.09 is required for B::Generate to operate correctly, you should > "use B 1.09;" in B/Generate.pm, and you should not skip that test.
People would not want that. use B 1.09 would die in older perls, but older perls still support B::Generate mostly. And it passes all tests but one new function, which is unsupported on older perls. The solution would be to add another B::Generate::NewWithStart package, but since $cv->NEW_with_start is unsafe to use anyway as mentioned in the docs [CPAN# 28912] and has always been in B::Generate I will not change that. It's optional. There are three dynamic tests which add optional API's and behaviour: PAD_ALLOC, CV_CLONE and FOLD_CONSTANTS -- Reini Urban
Subject: Re: [rt.cpan.org #70397] B::Generate dep on B not enforced
Date: Thu, 20 Oct 2011 17:03:50 +0100
To: Reini Urban via RT <bug-B-Generate [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Reini Urban via RT wrote: Show quoted text
>It's optional.
If you regard B::Generate as working correctly without it, then Makefile.PL and META.yml shouldn't be claiming that B>=1.09 is an absolute requirement. You should either remove that declaration or downgrade it to "recommends". -zefram
On Thu Oct 20 12:04:01 2011, zefram@fysh.org wrote: Show quoted text
> Reini Urban via RT wrote:
> >It's optional.
> > If you regard B::Generate as working correctly without it, then > Makefile.PL and META.yml shouldn't be claiming that B>=1.09 is an
absolute Show quoted text
> requirement. You should either remove that declaration or downgrade
it to Show quoted text
> "recommends".
1.39 removed the B version dep. I test it down to B-1.02 / perl-5.8.4 but maybe I'll start testing earlier perls also,when someone complains -- Reini Urban