Skip Menu |

This queue is for tickets about the Devel-TypeCheck CPAN distribution.

Report information
The Basics
Id: 16933
Status: open
Priority: 0/
Queue: Devel-TypeCheck

People
Owner: Nobody in particular
Requestors: lionel.cons [...] cern.ch
Cc:
AdminCc:

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



Date: Fri, 6 Jan 2006 11:28:49 +0100
From: Lionel Cons <lionel.cons [...] cern.ch>
To: bug-devel-typecheck [...] rt.cpan.org
Subject: Devel::TypeCheck on Perl 5.8.0
Hello, I'm investigating ways to improve the quality of Perl programs by static analysis and found your module. It looks great and seems to cover exactly one part of what I need to check. I tried to use it in my environment and it failed. However, I'm using Perl 5.8.0 (and have to continue to use it for some time) and you mentioned only 5.8.1 in your documentation. Do you plan to support your package on 5.8.0? FWIW, I include below the error I got. Cheers, Show quoted text
__________________________________________________________ Lionel Cons http://cern.ch/lionel.cons CERN http://cern.ch $ perl -MO=TypeCheck /tmp/x.pl Defaulting to -main Type checking CVs: main::MAIN Method &bindUp not implemented at Devel/TypeCheck/Type.pm line 74 Devel::TypeCheck::Type::AUTOLOAD('Devel::TypeCheck::Type::Mu=HASH(0x893f29c)','Devel::TypeCheck::Type::Chi=HASH(0x893d750)','Devel ::TypeCheck::Environment=HASH(0x89070b8)') called at Devel/TypeCheck/Type/Chi.pm line 256 Devel::TypeCheck::Type::Chi::listCoerce('Devel::TypeCheck::Type::Chi=HASH(0x893d750)','Devel::TypeCheck::Environment=HASH(0x89070b 8)') called at Devel/TypeCheck/Type.pm line 396 Devel::TypeCheck::Type::listCoerce('Devel::TypeCheck::Type::Mu=HASH(0x893e1f4)','Devel::TypeCheck::Environment=HASH(0x89070b8)') c alled at Devel/TypeCheck/Type/Omicron.pm line 335 Devel::TypeCheck::Type::Omicron::append('Devel::TypeCheck::Type::Omicron=HASH(0x893d6d8)','Devel::TypeCheck::Type::Mu=HASH(0x893e1 f4)','Devel::TypeCheck::Environment=HASH(0x89070b8)','Devel::TypeCheck::Type::Mu=HASH(0x893efb4)') called at Devel/TypeCheck/Type.pm line 312 Devel::TypeCheck::Type::append('Devel::TypeCheck::Type::Mu=HASH(0x893efb4)','Devel::TypeCheck::Type::Mu=HASH(0x893e1f4)','Devel::T ypeCheck::Environment=HASH(0x89070b8)') called at B/TypeCheck.pm line 215 B::TypeCheck::smash('ARRAY(0x89134d8)','Devel::TypeCheck::Environment=HASH(0x89070b8)') called at B/TypeCheck.pm line 253 B::TypeCheck::typeOpChildren('B::UNOP=SCALAR(0x8913574)','Devel::TypeCheck::Pad2type=ARRAY(0x8907178)','Devel::TypeCheck::Environm ent=HASH(0x89070b8)','B::CV=SCALAR(0x8906f20)',0) called at B/TypeCheck.pm line 576 B::TypeCheck::typeOp('B::UNOP=SCALAR(0x8913574)','Devel::TypeCheck::Pad2type=ARRAY(0x8907178)','Devel::TypeCheck::Environment=HASH (0x89070b8)','B::CV=SCALAR(0x8906f20)',0) called at B/TypeCheck.pm line 1168 B::TypeCheck::typeOp('B::BINOP=SCALAR(0x89135ec)','Devel::TypeCheck::Pad2type=ARRAY(0x8907178)','Devel::TypeCheck::Environment=HAS H(0x89070b8)','B::CV=SCALAR(0x8906f20)',1) called at B/TypeCheck.pm line 241 B::TypeCheck::typeOpChildren('B::LISTOP=SCALAR(0x83e45d8)','Devel::TypeCheck::Pad2type=ARRAY(0x8907178)','Devel::TypeCheck::Enviro nment=HASH(0x89070b8)','B::CV=SCALAR(0x8906f20)',1) called at B/TypeCheck.pm line 565 B::TypeCheck::typeOp('B::LISTOP=SCALAR(0x83e45d8)','Devel::TypeCheck::Pad2type=ARRAY(0x8907178)','Devel::TypeCheck::Environment=HA SH(0x89070b8)','B::CV=SCALAR(0x8906f20)',1) called at B/TypeCheck.pm line 2177 B::TypeCheck::typecheck('B::LISTOP=SCALAR(0x83e45d8)','B::CV=SCALAR(0x8906f20)','Devel::TypeCheck::Environment=HASH(0x89070b8)') c alled at B/TypeCheck.pm line 2255 eval {...} called at B/TypeCheck.pm line 2254 B::TypeCheck::callback() called at (eval 1) line 31 O::CHECK() called at /tmp/x.pl line 0 eval {...} called at /tmp/x.pl line 0 CHECK failed--call queue aborted.
From: bargle [...] umiacs.umd.edu
On Fri Jan 06 05:29:37 2006, lionel.cons@cern.ch wrote: Show quoted text
> Hello, > > I'm investigating ways to improve the quality of Perl programs by > static analysis and found your module. It looks great and seems to > cover exactly one part of what I need to check. > > I tried to use it in my environment and it failed. However, I'm using > Perl 5.8.0 (and have to continue to use it for some time) and you > mentioned only 5.8.1 in your documentation. Do you plan to support > your package on 5.8.0? > > FWIW, I include below the error I got.
Ack! I'm sorry I missed your bug report. The problem you're getting isn't because of a version difference -- the version matters because the opcodes and their semantics change between releases, but not usually very much. It probably works just fine on 5.8.0. Can you re-run against the latest Devel::TypeCheck like so, and send me the output?: perl -MO=TypeCheck,-ugly,-verbose /tmp/x.pl Alternatively, if it doesn't have any proprietary code, can you send me x.pl? -- Gary
Subject: Re: [rt.cpan.org #16933] Devel::TypeCheck on Perl 5.8.0
Date: Thu, 13 Apr 2006 13:54:02 +0200
To: bug-Devel-TypeCheck [...] rt.cpan.org
From: Lionel Cons <lionel.cons [...] cern.ch>
Guest via RT writes: Show quoted text
> Can you re-run against the latest Devel::TypeCheck like so, and send me the output?:
Unfortunately, I can't. That was a small test script that I wrote to check what TypeCheck could do. Since it did not work, I gave up with TypeCheck and did not keep the script. I tried version 1.2.1 and did not see such problems. However, I don't understand why the module does not like the following: my %hash = ( 'x' => {'a' => 'aaa',}, 'y' => {'b' => 'bbb',}, ); I get: TYPE ERROR: Could not unify TUPLE of (STRING,REFERENCE to RECORD of {},STRING,REFERENCE to RECORD of {}) and LIST of (STRING, ...) at line 1, file /tmp/x.pl Is this expected? Cheers, Lionel
On Thu Apr 13 07:54:46 2006, lionel.cons@cern.ch wrote: Show quoted text
> Guest via RT writes:
> > Can you re-run against the latest Devel::TypeCheck like so, and
> send me the output?: > > Unfortunately, I can't. That was a small test script that I wrote to > check what TypeCheck could do. Since it did not work, I gave up with > TypeCheck and did not keep the script. > > I tried version 1.2.1 and did not see such problems. However, I don't > understand why the module does not like the following: > > my %hash = ( > 'x' => {'a' => 'aaa',}, > 'y' => {'b' => 'bbb',}, > ); > > I get: > > TYPE ERROR: Could not unify TUPLE of (STRING,REFERENCE to RECORD of > {},STRING,REFERENCE to RECORD of {}) and LIST of (STRING, ...) at line > 1, file /tmp/x.pl > > Is this expected?
Yeah. TypeCheck has trouble with this syntax because there's no difference between '=>' and ',' as far as the bytecode is concerned. It's a problem with the way the AASSIGN opcode is typed -- I need to make it work for this special case. Devel::TypeCheck still needs a lot of work to be practical. Thanks for the feedback! -- Gary