Skip Menu |

This queue is for tickets about the Test-Weaken CPAN distribution.

Report information
The Basics
Id: 42903
Status: resolved
Priority: 0/
Queue: Test-Weaken

People
Owner: jkegl [...] cpan.org
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.000000
  • 1.001_000
  • 1.001_004
  • 1.002000
Fixed in:
  • 1.003_004
  • 2.000000



Subject: immediate sub-reference not reported
Date: Fri, 30 Jan 2009 07:09:03 +1100
To: bug-Test-Weaken [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
This is the bit I mentioned in passing in the other ticket. With 1.002 the program below shows nothing leaked from the first example, $weaken = [ 0, 2, [], [] ]; where I hoped (if I understand what's supposed to happen) that the $leak array [ 'abc' ] would be reported as an unfreed component of $obj. The second shows a [ 'ghi' ] sub-component of $leak reported, but not $leak itself, $weaken = [ 0, 3, [], [ [ 'ghi' ] ] ];

Message body is not shown because sender requested not to inline it.

Since this is an actual bug and the other are features, I'm pushing this to the head of my queue.
Make that previous message read: Since this is an actual bug and the others are feature requests, I'm pushing this to the head of my queue.
Subject: Status on "immediate subrefence" bug
I've found the problem, coded the fix, and tested it, but I have yet to update the documentation. The fix changes the count of unfreed objects, and their order. Since this is a serious change, the new user's release will be a new major release, 2.000000. I think it is a good idea to pair major changes to the internals with a major change in the interface, so I'm also including an improved user interface. The next release will be a developer's release, with a first draft of the revised documentation. I hope to produce this shortly
Subject: Fixed in release 1.003_000, just uploaded
I've just uploaded 1.003_000, which has the fix to this bug, and the 2nd draft of the new documentation. Please check it out, if that's convenient. The interface has changed -- the main, static, interface routine is now leaks(), not poof(). poof() still exists (it's written as a wrapper around the new interface), but it is undocumented and deprecated. I hope you find the new interface an improvement. If all goes well, I'll put some finishing touches on the documentation, and create a developer's release that will be a release candidate for Test::Weaken 2.000000.
Subject: Re: [rt.cpan.org #42903] Fixed in release 1.003_000, just uploaded
Date: Wed, 04 Feb 2009 10:26:48 +1100
To: bug-Test-Weaken [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Jeffrey Kegler via RT" <bug-Test-Weaken@rt.cpan.org> writes: Show quoted text
> > 2nd draft of the new documentation.
Looks orright. You could include code snippets in among the func descriptions. I find it easier to follow a sample of an option usage etc than just words. For the "tracing memory leaks" bit you might cross reference Devel::FindRef, I've found it reasonable for tracking down why something didn't go away. It tends to be verbose and technical, but often there's a variable name or whatnot among the output that gives you a clue. Show quoted text
> The interface has changed -- the main, static, interface routine is now > leaks(),
I expect object methods is clearer than $weaken[3] etc. The distinction between "unfreed weak" and "unfreed strong" is gone is it? I found that pretty subtle, and was going to suggest describing the motivation -- now unnecessary if it's gone :). Show quoted text
> deprecated
In practice that means somewhere on a continuum from "alas the concept was unworkable" to "I had a better idea" to "I'm going to break your code on a whim"! I always wish people would say which they mean :-)
Subject: They'll be a few more developer's versions
I want to put the documentation through a few more drafts before 2.000000. Also, 1.003_000 didn't run on 5.8 or Windows. 5.8 punts because I inadvertently included 5.10 only test routines. Windows punts because one of my tests does a fork. The problems are in the tests, not the code, but one appears as a spurious "NA" on cpantesters, and the other as failure on Windows. I've fixed the 5.8 problem in 1.003_001. I expect to make the tests Windows-resistant in 1.003_002. If I hear no objections, I'm going to delete the 1.003_00n releases very soon after I get new, less problematic ones out. It saves space on CPAN.
I'll put code snippets and Devel::FindRef on my TODO list. Show quoted text
> The distinction between "unfreed weak" and "unfreed strong" > is gone is it?
At first the strong/weak distinction seemed very unsubtle. Weak references require very careful handling because even implicit copying strengthens them. 1.000000 did not attempt to preserve weakness when it returned references, so I reported weak references separately because that was the only way you could know the difference. This version preserves weakness on output and can be less "in your face" about the distinction. This allows someone who does not care about the distinction to ignore it, and someone who does care to dive in face first if they like. Show quoted text
> > deprecated
> > In practice that means somewhere on a continuum from "alas the concept > was unworkable" to "I had a better idea" to "I'm going to break your > code on a whim"! I always wish people would say which they mean :-)
This may be open source, but you've gotta allow me to keep some things to myself. :-)
Subject: Re: [rt.cpan.org #42903] They'll be a few more developer's versions
Date: Thu, 05 Feb 2009 09:56:21 +1100
To: bug-Test-Weaken [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Jeffrey Kegler via RT" <bug-Test-Weaken@rt.cpan.org> writes: Show quoted text
> > The problems are in the tests,
Incidentally, in bug42903.t you might consider Test::More is_deeply() instead of looking at the text from Data::Dumper. You never know when the latter might get prettified or whatnot and come out a bit different.
My apologies for the slow progress. I needed to catch up on bookkeeping, and rewriting the documentation into presentable draft form has taken some time. For me, adding snippets to the documentation is a major project, because I create tests for all my snippets. (Apparently many module writers who do not do this, and how they keep their snippets bug-free I cannot imagine.) I expect to have another developer's release out soon. If all goes well, the developer's release after that will be a release candidate for 2.000000.
You have a good point, but I'm going to postpone dealing with this until after 2.000000. Right now I am using Test::Differences on the Data::Dumper outputs, so that in case of error I get the differences in a nice tabular form. I want to run a few experiments to see how Test::More::is_deeply() behaves in the face of screwups. If the switchover is a lose from the point of view of perspicuous output in the event of failed tests, I'll probably decide to take my chances with changes in the output format of Data::Dumper. On Wed Feb 04 17:58:28 2009, user42@zip.com.au wrote: Show quoted text
> Incidentally, in bug42903.t you might consider Test::More is_deeply() > instead of looking at the text from Data::Dumper. You never know when > the latter might get prettified or whatnot and come out a bit different.
1.003_003 is out. I'll want to see what cpantesters makes of it (so far so good) and reread the documentation once more to see if it contains no problems which justify holding up a bug fix. So 1.003_003 is actually release candidate 1 for 2.000000.
I just uploaded 2.000000. Unless a problem shows up with cpantesters, I will close this bug in a couple of days.
Fixed in 2,000000, which cpantesters is giving a clean bill of health.