bigpresh / Dancer-Plugin-Database

Dancer::Plugin::Database - easy database support for Dancer applications
http://search.cpan.org/dist/Dancer-Plugin-Database
37 stars 36 forks source link

Error code 255, while making 'test_dynamic' with Strawberry Perl on MS Windows #35

Closed sdeseille closed 11 years ago

sdeseille commented 11 years ago

Hello

I found a little problem by compiling last version of 'Dancer-Plugin-Database' with Strawberry Perl on MS Windows. I have a very little patch to solve it. ;)


Below my report :

cpanm (App::cpanminus) 1.5006 on perl 5.012003 built for MSWin32-x86-multi-thread Work directory is /.cpanm/work/1349380882.648 You have make D:\Strawberry\c\bin\dmake.exe You have LWP 6.02 Falling back to Archive::Tar 1.76 Searching Dancer::Plugin::Database on cpanmetadb ... --> Working on Dancer::Plugin::Database Fetching http://search.cpan.org/CPAN/authors/id/B/BI/BIGPRESH/Dancer-Plugin-Database-2.01.tar.gz -> OK Unpacking Dancer-Plugin-Database-2.01.tar.gz Entering Dancer-Plugin-Database-2.01 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.62) Configuring Dancer-Plugin-Database-2.01 Running Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Dancer::Plugin::Database -> OK Finding PREREQ from Makefile ... Checking if you have Test::More 0 ... Yes (0.98) Checking if you have Dancer 1.3099 ... Yes (1.3100) Checking if you have DBI 0 ... Yes (1.616) Building and testing Dancer-Plugin-Database-2.01 cp lib/Dancer/Plugin/Database.pm blib\lib\Dancer\Plugin\Database.pm cp lib/Dancer/Plugin/Database/Handle.pm blib\lib\Dancer\Plugin\Database\Handle.pm D:\Strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t

Testing Dancer::Plugin::Database 2.01, with Dancer 1.31 in Perl 5.012003, D:\STRAWB~1\perl\bin\perl.exe

t/00-load.t ....... ok

Failed test 'database_connection_failed hook fires'

at t/01-basic.t line 174.

got: ''

expected: '1'

Looks like you failed 1 test of 41.

t/01-basic.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/41 subtests

Testing Dancer::Plugin::Database::Handle 0.12, Perl 5.012003, D:\STRAWB~1\perl\bin\perl.exe

t/02-handle.t ..... ok t/manifest.t ...... skipped: Author tests not required for installation t/pod-coverage.t .. ok t/pod.t ........... ok

Test Summary Report

t/01-basic.t (Wstat: 256 Tests: 41 Failed: 1) Failed test: 41 Non-zero exit status: 1 Files=6, Tests=52, 4 wallclock secs ( 0.13 usr + 0.02 sys = 0.14 CPU) Result: FAIL Failed 1/6 test programs. 1/52 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic' -> FAIL Installing Dancer::Plugin::Database failed. See .cpanm\build.log for details. Expiring 13 work directories.


Below my patch

Edit file TestApp.pm

replace line : return var 'connection_failed';

by line : return var('connection_failed');


Below my result

C:.cpanm\work\1349380882.648\Dancer-Plugin-Database-2.01>dmake test D:\Strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00-load.t ....... 1/1 # Testing Dancer::Plugin::Database 2.01, with Dancer 1.3 1 in Perl 5.012003, D:\STRAWB~1\perl\bin\perl.exe t/00-load.t ....... ok t/01-basic.t ...... ok t/02-handle.t ..... # Testing Dancer::Plugin::Database::Handle 0.12, Perl 5.0120 03, D:\STRAWB~1\perl\bin\perl.exe t/02-handle.t ..... ok t/manifest.t ...... skipped: Author tests not required for installation t/pod-coverage.t .. ok t/pod.t ........... ok All tests successful. Files=6, Tests=52, 3 wallclock secs ( 0.06 usr + 0.09 sys = 0.16 CPU) Result: PASS

bigpresh commented 11 years ago

Weird. At first glance, that fix makes no sense to me - it does not look like it ought to fix the problem.

You're sure that it was fixed by that, and isn't just an intermittent failure that sometimes fails, sometimes doesn't?

I'm willing to incorporate the fix either way as it's safe, but it just feels weird to me - off the top of my head, the lack of params should only matter if var hasn't yet been defined by that point, but it has (if it hadn't, I'd expect a compilation failure, not incorrect behaviour).

bigpresh commented 11 years ago

Out of curiosity @sdeseille would you be able to provide the output from the start of testing which should show which versions of the most pertinent dependencies you're running? Struggling to understand or reproduce the problem here

wchristian commented 11 years ago

@sdeseille We've sadly been unable to reproduce your issue. Since you are on windows, like me, it would be extremely helpful if you could just zip up your entire strawberry directory and upload it. My suggestion for a host would be dropbox.

Can you please do that?

bigpresh commented 11 years ago

Thanks @wchristian for your effort trying to reproduce this - appreciate it :)

@sdeseille - if you're happy to share your strawberry directory, we could perhaps figure out why this was failing for you, and why the change suggested should make any difference.

The only way I can see it should change the behaviour is if var() hadn't been defined at that point - then you could see behaviour like my experiment at http://scsys.co.uk:8002/209267 - but var is defined as part of the core DSL in Dancer.pm, so if that was the case, things would be seriously screwy!

sdeseille commented 11 years ago

Hi again

I made new test and i identified problem is link to the step of installing module by cpanm.

Test failed like this : C:\WINDOWS\system32>cpanm Dancer::Plugin::Database --> Working on Dancer::Plugin::Database Fetching http://search.cpan.org/CPAN/authors/id/B/BI/BIGPRESH/Dancer-Plugin-Data base-2.01.tar.gz ... OK Configuring Dancer-Plugin-Database-2.01 ... OK Building and testing Dancer-Plugin-Database-2.01 ... FAIL ! Installing Dancer::Plugin::Database failed. See .cpanm\build.log for details.

But if i went to following directory : C:.cpanm\work\1349388271.1888\Dancer-Plugin-Database-2.01 and i made test by hand it work without error even if i don't modify TestApp.pm as you can see below.

C:.cpanm\work\1349380882.648\Dancer-Plugin-Database-2.01>cd C:.cpanm\work\1349 388271.1888\Dancer-Plugin-Database-2.01

C:.cpanm\work\1349388271.1888\Dancer-Plugin-Database-2.01>dmake test D:\Strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00-load.t ....... 1/1 # Testing Dancer::Plugin::Database 2.01, with Dancer 1.3 1 in Perl 5.012003, D:\STRAWB~1\perl\bin\perl.exe t/00-load.t ....... ok t/01-basic.t ...... ok t/02-handle.t ..... # Testing Dancer::Plugin::Database::Handle 0.12, Perl 5.0120 03, D:\STRAWB~1\perl\bin\perl.exe t/02-handle.t ..... ok t/manifest.t ...... skipped: Author tests not required for installation t/pod-coverage.t .. ok t/pod.t ........... ok All tests successful. Files=6, Tests=52, 3 wallclock secs ( 0.08 usr + 0.03 sys = 0.11 CPU) Result: PASS

I will share with you my strawberry repository tomorrow night.

regards

sdeseille

2012/10/4 David Precious notifications@github.com

Thanks @wchristian https://github.com/wchristian for your effort trying to reproduce this - appreciate it :)

@sdeseille https://github.com/sdeseille - if you're happy to share your strawberry directory, we could perhaps figure out why this was failing for you, and why the change suggested should make any difference.

The only way I can see it should change the behaviour is if var() hadn't been defined at that point - then you could see behaviour like my experiment at http://scsys.co.uk:8002/209267 - but var is defined as part of the core DSL in Dancer.pm, so if that was the case, things would be seriously screwy!

— Reply to this email directly or view it on GitHubhttps://github.com/bigpresh/Dancer-Plugin-Database/issues/35#issuecomment-9158463.

Cordialement

Sebastien Deseille

sdeseille commented 11 years ago

Hello all

You will find dropbox link to my strawberry Perl repository here : https://www.dropbox.com/s/w64qaw1e63sre90/Strawberry_sdeseille.zip

I updated DBI and DBD::SQLite modules but nothing is solved.

regards

Sebastien Deseille

2012/10/5 sebastien deseille sebastien.deseille@gmail.com

Hi again

I made new test and i identified problem is link to the step of installing module by cpanm.

Test failed like this : C:\WINDOWS\system32>cpanm Dancer::Plugin::Database --> Working on Dancer::Plugin::Database Fetching http://search.cpan.org/CPAN/authors/id/B/BI/BIGPRESH/Dancer-Plugin-Data base-2.01.tar.gz ... OK Configuring Dancer-Plugin-Database-2.01 ... OK Building and testing Dancer-Plugin-Database-2.01 ... FAIL ! Installing Dancer::Plugin::Database failed. See .cpanm\build.log for details.

But if i went to following directory : C:.cpanm\work\1349388271.1888\Dancer-Plugin-Database-2.01 and i made test by hand it work without error even if i don't modify TestApp.pm as you can see below.

C:.cpanm\work\1349380882.648\Dancer-Plugin-Database-2.01>cd C:.cpanm\work\1349 388271.1888\Dancer-Plugin-Database-2.01

C:.cpanm\work\1349388271.1888\Dancer-Plugin-Database-2.01>dmake test D:\Strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00-load.t ....... 1/1 # Testing Dancer::Plugin::Database 2.01, with Dancer 1.3 1 in Perl 5.012003, D:\STRAWB~1\perl\bin\perl.exe t/00-load.t ....... ok t/01-basic.t ...... ok t/02-handle.t ..... # Testing Dancer::Plugin::Database::Handle 0.12, Perl 5.0120 03, D:\STRAWB~1\perl\bin\perl.exe t/02-handle.t ..... ok t/manifest.t ...... skipped: Author tests not required for installation t/pod-coverage.t .. ok t/pod.t ........... ok All tests successful. Files=6, Tests=52, 3 wallclock secs ( 0.08 usr + 0.03 sys = 0.11 CPU) Result: PASS

I will share with you my strawberry repository tomorrow night.

regards

sdeseille

2012/10/4 David Precious notifications@github.com

Thanks @wchristian https://github.com/wchristian for your effort trying to reproduce this - appreciate it :)

@sdeseille https://github.com/sdeseille - if you're happy to share your strawberry directory, we could perhaps figure out why this was failing for you, and why the change suggested should make any difference.

The only way I can see it should change the behaviour is if var() hadn't been defined at that point - then you could see behaviour like my experiment at http://scsys.co.uk:8002/209267 - but var is defined as part of the core DSL in Dancer.pm, so if that was the case, things would be seriously screwy!

— Reply to this email directly or view it on GitHubhttps://github.com/bigpresh/Dancer-Plugin-Database/issues/35#issuecomment-9158463.

Cordialement

Sebastien Deseille

Cordialement

Sebastien Deseille

wchristian commented 11 years ago

Wow, strange. I downloaded that zip, unpacked it to d:, then put portableshell.batand portable.perl from the PortableZip editions into the dir, ran the bat and ran cpanm Dancer::Plugin::Database. It installed without any issue.

Do you have any other Perls installed?

Can you please download a portable strawberry perl and install via that?

sdeseille commented 11 years ago

Hi Christian

Thanks a lot for your help.

I found an old install of active state perl on my laptop. I uninstalled it and next tried again to install Dancer::Plugin::Database.

And the result is : ......

Successfully installed Dancer-Plugin-Database-2.01 (upgraded from 1.51) 1 distribution installed

So my problem wasn't a bug and it is solved.

Best regards

sdeseille

2012/10/6 Christian Walde notifications@github.com

Wow, strange. I downloaded that zip, unpacked it to d:, then put portableshell.batand portable.perl from the PortableZip editions into the dir, ran the bat and ran cpanm Dancer::Plugin::Database. It installed without any issue.

Do you have any other Perls installed?

Can you please download a portable strawberry perl and install via that?

— Reply to this email directly or view it on GitHubhttps://github.com/bigpresh/Dancer-Plugin-Database/issues/35#issuecomment-9196952.

Cordialement

Sebastien Deseille

wchristian commented 11 years ago

Haha, yeah. It's possible that that interfered somehow. Thanks for checking. :)