GSOC Status Report, Week 6

1 view
Skip to first unread message

Brian Fraser

unread,
Jul 7, 2011, 11:47:51 AM7/7/11
to tpf-gsoc...@googlegroups.com, Perl5 Porters Mailing List, Florian Ragwitz, Karl Williamson, Father Chrysostomos, Zefram
Howdy folks.

Stash/GV cleanup is.. Well, not done yet, but close enough! I'm mid-rebasing and, while there's a couple of regressions popping up, except for the one relating to HEK_HASH() that I mentioned  in a previous mail, I should hopefully be able to get things sorted out today-ish; I expect that by tomorrow I'll be nagging rafl for a smoke-me branch. So huzzah in advance for that.

Progress has been fairly steady this week; I spent most of it checking/correcting the work so far, writing tests, and these last two days, organizing and amending commits.

For the bad news:
  • I noticed a couple of minutes ago that I was doing something incredibly silly with ->DOES, so that's not yet done. Assuming I don't have another blunder like that though, ->DOES should be done soon (again).
  • Several tests in uni/gv.t remain as TODO, because they deal with prototypes, which aren't yet clean - Unfortunately, I had no idea that you could use a arbitrary string as a prototype, not just @$+_, etc, so this had completely escaped me until now. From a quick look, it doesn't appear terribly daunting to fix (the prototype is stored as an SV), but unless someone thinks they are important and they should be done foremost, I'll shove them into the TODO pile.
  • On the rebasing front, I still have to split up one hugeish toke.c commit into something more reasonable, so that's not altogether ready for review yet.

And since we are at it, I'm missing tests for these warnings/exceptions, so any help in finding how to trigger them would be quite welcome:
gv.c, Gv_AMupdate: (Stub found while resolving|Can't resolve) method "Foo" overloading "Bar" in package "Baz"
gv.c, amagic_call: Operation "X": no method found ...
doio.c, do_openn: Warning: unable to close filehandle X properly.
ext/mro/mro.xs: mro_get_linear_isa_c3: Inconsistent hierarchy during C3 merge of class ...

The rest of this week will go into polishing the work so far; Moreso when the reviews and smoke reports start piling in :) With some luck, today or tomorrow I'll push the branch, so start preparing to do your worst?

And that's all for now, I think. Short report, but my struggle with git rebase aside, it wasn't a particularly dramatic week.

Nicholas Clark

unread,
Aug 3, 2011, 10:00:29 AM8/3/11
to Brian Fraser, tpf-gsoc...@googlegroups.com, Perl5 Porters Mailing List, Florian Ragwitz, Karl Williamson, Father Chrysostomos, Zefram
On Thu, Jul 07, 2011 at 12:47:51PM -0300, Brian Fraser wrote:

> ext/mro/mro.xs: mro_get_linear_isa_c3: Inconsistent hierarchy during C3
> merge of class ...

Ooooh, that doesn't seem to be tested anywhere. Fortunately Class::C3 on
CPAN seems to have a test that that we can "borrow". I mean imitate.
Imitation being the sincerest form of flattery.

(Assuming that you haven't written one between then and now. Likely this
belongs somewhere in ext/mro/t/)

Nicholas Clark

#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 1;

=pod

This example is take from: http://www.python.org/2.3/mro.html

"Serious order disagreement" # From Guido
class O: pass
class X(O): pass
class Y(O): pass
class A(X,Y): pass
class B(Y,X): pass
try:
class Z(A,B): pass #creates Z(A,B) in Python 2.2
except TypeError:
pass # Z(A,B) cannot be created in Python 2.3

Perl by rafl in the Class::C3 test suite, adapted for the core to use 'c3',
and switch from base to parent.

=cut

eval q{
package X;
use mro 'c3';

package Y;
use mro 'c3';

package XY;
use mro 'c3';
use parent ('-norequire', 'X', 'Y');

package YX;
use mro 'c3';
use parent ('-norequire', 'Y', 'X');

package Z;
use mro 'c3';
use parent ('-norequire', 'XY', 'YX');
};

like($@, qr/Inconsistent hierarchy during C3 merge of class 'Z'/,
'... got the right error with an inconsistent hierarchy');

Brian Fraser

unread,
Aug 4, 2011, 2:42:12 AM8/4/11
to Nicholas Clark, tpf-gsoc...@googlegroups.com, Perl5 Porters Mailing List, Florian Ragwitz, Karl Williamson, Father Chrysostomos, Zefram
On Wed, Aug 3, 2011 at 11:00 AM, Nicholas Clark <ni...@ccl4.org> wrote:
Ooooh, that doesn't seem to be tested anywhere. Fortunately Class::C3 on
 
CPAN seems to have a test that that we can "borrow". I mean imitate.
Imitation being the sincerest form of flattery.

(Assuming that you haven't written one between then and now. Likely this
belongs somewhere in ext/mro/t/)


I approve of such gallantry course of action! But rafl did write a test a couple of weeks back, though I guess it didn't make it into blead. I'll add it to ext/mro/t/ unless someone wants to commit it earlier?
 
Also, I think that none of the "*dir() attempted on invalid dirhandle %s" warnings are tested anywhere, so if someone gets around adding the mro test, maybe add those too? Triggering the warning itself is trivial, but I assume the portability concerns are not: perl -we 'opendir my $dir, "."; closedir $dir; seekdir $dir, 0;'
Reply all
Reply to author
Forward
0 new messages