[BUG]: io/io_win32.c

2007-01-07 Thread Xi Wang

There are 4 calls to _close on io-fd in functions PIO_win32_send and
PIO_win32_recv.
However, the CRT function _close should not be applied on SOCKET, which
crashes here.

I suggest to replace _close((SOCKET)io-fd); by PIO_win32_close(interp,
layer, io);
or closesocket((SOCKET)io-fd); io-fd = 0;.

Xi


use diff for string in some test

2007-01-07 Thread Lee Duhem
I think we need some diff-like facility for string in Test::More
(or somewhere else appropriate), these options of diff for files
will be wanted:

 -E  --ignore-tab-expansion  Ignore changes due to tab expansion.
 -b  --ignore-space-change  Ignore changes in the amount of white space.
 -w  --ignore-all-space  Ignore all white space.
 -B  --ignore-blank-lines  Ignore changes whose lines are all blank.
 --strip-trailing-cr  Strip trailing carriage return on input.


A few days ago, test t/examples/past.t fails because particle's
whitespace clean up on it, some tailing spaces in expect output 
have been removed. If we have this facility and use it, this test 
will be passed perfectly after particle's whitespace cleanup. 

By the way, some naive implement of this diff will be enough for
t/examples/past.t and some other tests of parrot.

Lee


[perl #41198] [TODO] tools/dev/mk_manifest_and_skip.pl should be aware of MANIFEST.generated

2007-01-07 Thread via RT
# New Ticket Created by  Bernhard Schmalhofer 
# Please include the string:  [perl #41198]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41198 


Hi,

the files

compilers/imcc/imcparser.c 
compilers/imcc/imcparser.h 
languages/cola/lexer.c  
languages/cola/parser.c

are in the SVN repository and are mentioned in MANIFEST.generated.
However invoking tools/dev/mk_manifest_and_skip.pl adds these files
to MANIFEST. This breaks convenient regeneration of MANIFEST.

To resolve this, mk_manifest_and_skip.pl could be taught to look in 
MANIFEST.generated for
files that should not be added to MANIFEST. Or the above files could be 
moved back to MANIFEST.




Re: use diff for string in some test

2007-01-07 Thread Nicholas Clark
On Sun, Jan 07, 2007 at 03:34:41PM +0800, Lee Duhem wrote:
 I think we need some diff-like facility for string in Test::More
 (or somewhere else appropriate), these options of diff for files
 will be wanted:
 
  -E  --ignore-tab-expansion  Ignore changes due to tab expansion.
  -b  --ignore-space-change  Ignore changes in the amount of white space.
  -w  --ignore-all-space  Ignore all white space.
  -B  --ignore-blank-lines  Ignore changes whose lines are all blank.
  --strip-trailing-cr  Strip trailing carriage return on input.
 
 
 A few days ago, test t/examples/past.t fails because particle's
 whitespace clean up on it, some tailing spaces in expect output 
 have been removed. If we have this facility and use it, this test 
 will be passed perfectly after particle's whitespace cleanup. 

Shouldn't that have failed tests before it was checked in?

I'm not convinced that allowing slop in expected output is a good idea.
It introduces (more) complexity into the tests, which increases the chance
for false positives (errors in the tests reporting themselves as failures,
distracting developers) and false negatives (tests not spotting real errors)

Nicholas Clark


Re: use diff for string in some test

2007-01-07 Thread Bernhard Schmalhofer

Nicholas Clark schrieb:

On Sun, Jan 07, 2007 at 03:34:41PM +0800, Lee Duhem wrote:
  

I think we need some diff-like facility for string in Test::More
(or somewhere else appropriate), these options of diff for files
will be wanted:

 -E  --ignore-tab-expansion  Ignore changes due to tab expansion.
 -b  --ignore-space-change  Ignore changes in the amount of white space.
 -w  --ignore-all-space  Ignore all white space.
 -B  --ignore-blank-lines  Ignore changes whose lines are all blank.
 --strip-trailing-cr  Strip trailing carriage return on input.


Shouldn't that have failed tests before it was checked in?

I'm not convinced that allowing slop in expected output is a good idea.
It introduces (more) complexity into the tests, which increases the chance
for false positives (errors in the tests reporting themselves as failures,
distracting developers) and false negatives (tests not spotting real errors)

  
I think the t/examples/past.t is one of the rare cases where ignoring 
whitespace would be useful.
Generated code is allowed to change, as long as it still does the wanted 
thing.
However, the only purpose of t/examples/past.t is to check that  
examples/past/01-sub.pir
is still working. This can be guaranteed with a regexp-based sanity 
check, as it is done now.

So there is no immediate need for action.

I propose to use Test::Differences for other reasons. When comparing 
texts with eq_or_diff()
it is much easier to see where the deviation is. It is also much easier 
to decide wheter the code

or the test is incorrect.

Regards, Bernhard







[perl #41195] [BUG]: Change to Configure.pl causing 'make' to fail on Darwin

2007-01-07 Thread Steve Peters via RT
What is your c++ symlink pointing at?





[perl #41201] [TODO] Remove temporary conf hack in Configure.pl

2007-01-07 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #41201]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41201 


In Configure.pl there is a mention of $Parrot::Configure::Step::conf
being a temporary hack, this should be implemented properly.


Re: use diff for string in some test

2007-01-07 Thread Lee Duhem
On Sun, Jan 07, 2007 at 12:51:46PM +, Nicholas Clark wrote:
 
 I'm not convinced that allowing slop in expected output is a good idea.

Sometime allow some slop is convenient, like the situation in
t/examples/past.t

 It introduces (more) complexity into the tests, which increases the chance
 for false positives (errors in the tests reporting themselves as failures,
 distracting developers) and false negatives (tests not spotting real errors)

If it's abused, yes!

Lee


Re: [perl #41195] [BUG]: Change to Configure.pl causing 'make' to fail on Darwin

2007-01-07 Thread James Keenan


On Jan 7, 2007, at 8:44 AM, Steve Peters via RT wrote:


What is your c++ symlink pointing at?





[parrot] 512 $ ls -l /usr/bin/c++
lrwxr-xr-x   1 root  wheel  7 Aug  9  2004 /usr/bin/c++ - g++-3.3
[parrot] 513 $ ls -l /usr/bin/g++-3.3
-r-xr-xr-x   1 root  wheel  135816 May 14  2006 /usr/bin/g++-3.3



Re: [perl #41198] [TODO] tools/dev/mk_manifest_and_skip.pl should be aware of MANIFEST.generated

2007-01-07 Thread jerry gay

On 1/7/07, via RT Bernhard Schmalhofer
[EMAIL PROTECTED] wrote:

# New Ticket Created by  Bernhard Schmalhofer
# Please include the string:  [perl #41198]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41198 


Hi,

the files

compilers/imcc/imcparser.c
compilers/imcc/imcparser.h
languages/cola/lexer.c
languages/cola/parser.c

are in the SVN repository and are mentioned in MANIFEST.generated.
However invoking tools/dev/mk_manifest_and_skip.pl adds these files
to MANIFEST. This breaks convenient regeneration of MANIFEST.

To resolve this, mk_manifest_and_skip.pl could be taught to look in
MANIFEST.generated for
files that should not be added to MANIFEST. Or the above files could be
moved back to MANIFEST.


even though these files are generated, they are checked into the
repository. they are regenerated only by imcc maintainers, when parser
and lexer changes are made. it's not expected that anyone other than
these maintainers have bison or flex installed--this is why they're in
the repository.

therefore, these files should not be mentioned in MANIFEST.generated,
and must be mentioned in MANIFEST.
~jerry