PadreIDE / Debug-Client

Debug::Client
1 stars 4 forks source link

Strawberry perl 5.22.0 test failures #2

Closed kmx closed 7 years ago

kmx commented 9 years ago

Hi,

I have experienced the following test failure strawberry perl portable 5.22.0.1/32bit

"D:\strawberry32\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t
t/00-check-deps.t ..... ok
# Info: Testing Debug::Client 0.29
# Info: Perl v5.22.0
t/01-compile.t ........ ok
t/02-exports.t ........ ok
t/03-pod.t ............ skipped: Author tests, not required for installation.
t/04-pod-coverage.t ... skipped: Author tests, not required for installation.
# 
# Info: Perl v5.22.0
# Info: OS MSWin32
# Info: Term::ReadLine::Gnu is not installed
Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at D:/strawberry32/perl/site/lib/Term/ReadKey.pm line 451.
# Info: Using ReadLine implementation -> Term::ReadLine::Perl
# INFO: Setting $ENV{TERM} -> dumb
# INFO: $ENV{TERM} -> dumb
t/06-term.t ........... ok
Two
Five
Two
Five
t/07-initialize.t ..... ok
t/08-io.t ............. ok
t/10-top_tail.t ....... ok
t/10-top_tail_old.t ... ok
t/11-add.t ............ ok
t/13-return.t ......... ok
t/14-run.t ............ ok
# Info: perl5db version 1.49
t/15-run_to_line.t .... ok
t/16-run_to_sub.t ..... ok
t/17-stepin.t ......... ok
t/18-stepout.t ........ ok
t/19-stepover.t ....... ok
t/20-get_value.t ...... ok
t/21-toggle_trace.t ... ok
t/22-subnames.t ....... ok
t/23-breakpoints.t .... ok

#   Failed test 'y (0) $line = 1'
#   at t/24-y_zero.t line 34.
# Compared $data->[0]
#    got : 'Not nested deeply enough'
# expect : '$line = 1'
# Not nested deeply enough

#   Failed test 'y (0) $line = 2'
#   at t/24-y_zero.t line 34.
# Compared $data->[0]
#    got : 'Not nested deeply enough'
# expect : '$line = 2'
# Not nested deeply enough

#   Failed test 'y (0) $line = 3'
#   at t/24-y_zero.t line 34.
# Compared $data->[0]
#    got : 'Not nested deeply enough'
# expect : '$line = 3'
# Not nested deeply enough
# Looks like you failed 3 tests of 3.
t/24-y_zero.t ......... 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/3 subtests 
t/25-get_v_vars.t ..... ok
t/26-get_x_vars.t ..... ok
t/27-get_p_exp.t ...... ok
t/28-get_h_var.t ...... ok
# Info: ComamandSet = '580'
t/29-options.t ........ ok
t/40-test_1415-old.t .. ok
t/40-test_1415.t ...... ok
t/99-perldb.t ......... ok
# Prerequisite Report:
#    Version Module               
#   -------- ---------------------
#       1.36 Carp                 
#       5.72 Exporter             
#    7.04_01 ExtUtils::MakeMaker  
#       1.00 File::HomeDir        
#       3.56 File::Spec           
#       3.56 File::Spec::Functions
#     0.2304 File::Temp           
#       0.37 IO::Socket::IP       
#       1.42 List::Util           
#        2.1 PadWalker            
#       1.15 Term::ReadLine       
#      0.010 Test::CheckDeps      
#       0.48 Test::Class          
#      0.115 Test::Deep           
#   1.001014 Test::More           
#       1.50 Test::Pod            
#       1.10 Test::Pod::Coverage  
#       0.08 Test::Requires       
#       0.51 Win32                
#       0.16 Win32::Process       
#       1.33 constant             
#      0.234 parent               
#     0.9912 version              
t/report-prereqs.t .... ok

Test Summary Report
-------------------
t/24-y_zero.t       (Wstat: 768 Tests: 3 Failed: 3)
  Failed tests:  1-3
  Non-zero exit status: 3
Files=32, Tests=182, 49 wallclock secs ( 0.30 usr +  0.08 sys =  0.37 CPU)
Result: FAIL
ppisar commented 9 years ago

This happens since perl-5.21.3 http://matrix.cpantesters.org/?dist=Debug-Client+0.29.

ppisar commented 9 years ago

The 'Not nested deeply enough' message comes from perl debugger:

$ perl -d t/eg/14-y_zero.pl 

Loading DB routines from perl5db.pl version 1.49
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(t/eg/14-y_zero.pl:8):    $| = 1;
  DB<1> b 13
  DB<2> r
main::(t/eg/14-y_zero.pl:13):           print "$_ : $line \n";
  DB<2> y 1
Not nested deeply enough
  DB<3> y 0
$line = 0
  DB<4>

It looks like perl fixed the y-command regression regarding the scope level. See perl commit:

commit 496f5ba57a43840a3c8ee61b21dc60d0c8bb5d52
Author: Tony Cook <tony@develop-help.com>
Date:   Fri Aug 15 10:45:57 2014 +1000

    fix debugger y command scope level

    5c2b78e73d3 moved handling of the y command into its own function,
    but did not adjust the provided scope level to account for the extra
    scope.
ppisar commented 9 years ago

This patch fixes the issue in Debug-Client:

From d18971088b24ecdfb0cc4ea6aa78065d312710c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 17 Jun 2015 16:06:50 +0200
Subject: [PATCH] Debugger y-command start with 0 again since perl-5.21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Perl fixed the y-command regression regarding the scope level. See
perl commit:

commit 496f5ba57a43840a3c8ee61b21dc60d0c8bb5d52
Author: Tony Cook <tony@develop-help.com>
Date:   Fri Aug 15 10:45:57 2014 +1000

    fix debugger y command scope level

    5c2b78e73d3 moved handling of the y command into its own function,
    but did not adjust the provided scope level to account for the extra
    scope.

This caused failling Debug-Client tests with perl-5.22 because
Debug::Client implemented a work-around for the regression.

This patch limits the work-around from top too.

<https://github.com/PadreIDE/Debug-Client/issues/2>

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 lib/Debug/Client.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Debug/Client.pm b/lib/Debug/Client.pm
index eee355f..5c9dd6a 100644
--- a/lib/Debug/Client.pm
+++ b/lib/Debug/Client.pm
@@ -341,7 +341,7 @@ sub get_y_zero {
    require PadWalker if 0; #forces PadWalker to be a requires not a test_requires

    # say 'running on perl '. $PERL_VERSION;
-   if ( $PERL_VERSION >= 5.017006 ) {
+   if ( $PERL_VERSION >= 5.017006 && $PERL_VERSION <= 5.021003 ) {

        # say 'using y=1 instead as running on perl ' . $PERL_VERSION;
        $self->_send('y 1');
-- 
2.1.0
Signy13 commented 8 years ago

This patch worked for me - Debug::Client 0.29, Strawberry Perl 5.24.0, Win32. After manual installing of Debug::Client I was able to install Padre manually:

    perl Makefile.PL
    dmake
    dmake test
    dmake install
jfroebe commented 7 years ago

When will the patch from ppisar be integrated into a release?

manwar commented 7 years ago

Patch released.

ghost commented 7 years ago

I'm still receiving this error even after installing Debug::Client on my Windows 10 computer. I have strawberry perl (v5.26.0)

Constant subroutine main::DMatrix redefined at C:/Strawberry/perl/vendor/lib/aliased.pm line 45. at C:/Strawberry/perl/vendor/lib/aliased.pm line 45. aliased::_make_alias("AI::XGBoost::DMatrix", "main", undef) called at C:/Strawberry/perl/vendor/lib/aliased.pm line 23 aliased::import("aliased", "AI::XGBoost::DMatrix") called at zillow_test.pl line 30 main::BEGIN() called at zillow_test.pl line 30 eval {...} called at zillow_test.pl line 30 main::(zillow_test.pl:8): my $train_data = DMatrix->From(file => 'train.csv'); #agaricus.txt.train Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at C:/Strawberry/perl/vendor/lib/Term/ReadLine/readline.pm line 410. at C:/Strawberry/perl/vendor/lib/Term/ReadKey.pm line 462. Term::ReadKey::GetTerminalSize(GLOB(0x29296e0)) called at C:/Strawberry/perl/vendor/lib/Term/ReadLine/readline.pm line 410 readline::get_window_size called at C:/Strawberry/perl/vendor/lib/Term/ReadLine/readline.pm line 1114 readline::init called at C:/Strawberry/perl/vendor/lib/Term/ReadLine/readline.pm line 208 require Term/ReadLine/readline.pm called at C:/Strawberry/perl/vendor/lib/Term/ReadLine/Perl.pm line 63 eval {...} called at C:/Strawberry/perl/vendor/lib/Term/ReadLine/Perl.pm line 63 Term::ReadLine::Perl::new("Term::ReadLine", "perldb", GLOB(0x29d19a8), GLOB(0x29296e0)) called at C:/Strawberry/perl/lib/perl5db.pl line 6868 DB::setterm() called at C:/Strawberry/perl/lib/perl5db.pl line 1849 DB::_DBread_next_cmd(undef) called at C:/Strawberry/perl/lib/perl5db.pl line 2786 DB::DB called at zillow_test.pl line 8 SetConsoleMode failed, LastError=|6| at C:/Strawberry/perl/vendor/lib/Term/ReadKey.pm line 346. at C:/Strawberry/perl/vendor/lib/Term/ReadLine/readline.pm line 1581. readline::readline(" DB<1> ") called at C:/Strawberry/perl/vendor/lib/Term/ReadLine/Perl.pm line 11 Term::ReadLine::Perl::readline(Term::ReadLine::Perl=ARRAY(0xbf66b8), " DB<1> ") called at C:/Strawberry/perl/lib/perl5db.pl line 7367 DB::readline(" DB<1> ") called at C:/Strawberry/perl/lib/perl5db.pl line 1858 DB::_DBread_next_cmd(undef) called at C:/Strawberry/perl/lib/perl5db.pl line 2786 DB::DB called at zillow_test.pl line 8

mcooperman commented 7 years ago

I am also seeing this on a new install of Strawberry Perl v 5.26.0 when launching CPAN eg C:...> cpan Loading internal null logger. Install Log::Log4perl for logging messages Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at D:\Strawberry\perl\vendor\lib/Term/ReadLine/readline.pm line 410.

cpan shell -- CPAN exploration and modules installation (v2.18) Enter 'h' for help.

cpan>

ghost commented 5 years ago

You're still unable to run the perl debugger in Strawberry Perl v 5.28.0 on Windows. When running "perl -d test.pl" you receive an environmental error message that "Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work." Is there a fix for this issue?