beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

Upgrade failed from CPAN #422

Closed squarepegsys closed 10 years ago

squarepegsys commented 10 years ago

Running on OSX 10.8.5

Perl info:

perl -v This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-thread-multi-2level

Build output:

 Running tests on ack-standalone
 # Testing App::Ack 2.12, File::Next 1.12, Perl 5.012004, /usr/bin/perl
 # Using Test::More 1.001002 and Test::Harness 3.17
   t/00-load.t .................. ok

 #   Failed test 'Should have no output to stderr: ack Sue -1 -h t/text'
 #   at t/ack-1.t line 20.
 # [
 #   'Name "File::Next::dir" used only once: possible typo at /Users/mhostetler/.cpan/build/ack-2.12-KPa8DY/ack-standalone line 103.',
 #   'Undefined subroutine &File::Next::files called at /Users/mhostetler/.cpan/build/ack-2.12-KPa8DY/ackstandalone line 2865.'
 # ]

 #   Failed test 'Looking for first instance of Sue!'
 #   at t/Util.pm line 387.
 # +----+-----+----+---------------------------------------------------+
 # | Elt|Got  | Elt|Expected                                           |
 # +----+-----+----+---------------------------------------------------+
 # *   0|[]   *   0|[                                                  *
# |    |     *   1|  'Was before he left, he went and named me Sue.'  *
# |    |     *   2|]                                                  *
# +----+-----+----+---------------------------------------------------+
# actual[]
# expected[
#   'Was before he left, he went and named me Sue.'
# ]
# Looks like you failed 1 test of 1.

#   Failed test 'lists_match( Looking for first instance of Sue! )'
#   at t/ack-1.t line 22.

#   Failed test 'Should have no output to stderr: ack Sue -1 -h -v t/text/boy-named-sue.txt'
#   at t/ack-1.t line 33.
# [
#   'Name "File::Next::dir" used only once: possible typo at /Users/mhostetler/.cpan/build/ack-2.12-KPa8DY/ack-standalone line 103.',
#   'Undefined subroutine &File::Next::files called at /Users/mhostetler/.cpan/build/ack-2.12-KPa8DY/ack-standalone line 2865.'
# ]

....

petdance commented 10 years ago

How big is your ack-standalone?

Mine looks like this:

$ wc ack-standalone
    4986   16529  134679 ack-standalone

What about yours? I think that it might not be sucking up File::Next into the ack-standalone.

For that matter, try grepping for File::Next, please:

$ grep File::Next ack-standalone
        return !exists $ignore_dirs{$_} && !exists $ignore_dirs{$File::Next::dir};
        return 1 if $is_member_of_starting_set{ get_file_id($File::Next::name) };
            my ( undef, $dirname ) = File::Spec->splitpath($File::Next::name);
        return 0 if -p $File::Next::name;
                App::Ack::warn( "${File::Next::name}: cannot open file for reading" );
        my $resource = App::Ack::Resource::Basic->new($File::Next::name);
        return File::Next::reslash( $filename );
        File::Next::files( {
        File::Next::from_file( {
package File::Next;
                    local $File::Next::dir = $dirname;
                    local $File::Next::name = $fullpath;
                local $File::Next::dir  = $dirname;
                local $File::Next::name = $fullpath;
                local $File::Next::dir = $fullpath;
1; # End of File::Next
squarepegsys commented 10 years ago

I can't paste ack-standalone in the comment box, so I posted the file here:

https://www.strongspace.com/shared/ttqwpjqrzy

squarepegsys commented 10 years ago

I have:

> wc ack-standalone
4758   15803  129037 ack-standalone

And for grep:

grep File::Next ack-standalone return !exists $ignoredirs{$} && !exists $ignore_dirs{$File::Next::dir}; return 1 if $is_member_of_starting_set{ get_file_id($File::Next::name) }; my ( undef, $dirname ) = File::Spec->splitpath($File::Next::name); return 0 if -p $File::Next::name; App::Ack::warn( "${File::Next::name}: cannot open file for reading" ); my $resource = App::Ack::Resource::Basic->new($File::Next::name); return File::Next::reslash( $filename ); File::Next::files( { File::Next::from_file( {

petdance commented 10 years ago

Aha. That ack-standalone doesn't have File::Next in it.

$ wc  ack-standalone 
    4758   15803  129037 ack-standalone

$ grep File::Next ack-standalone
        return !exists $ignore_dirs{$_} && !exists $ignore_dirs{$File::Next::dir};
        return 1 if $is_member_of_starting_set{ get_file_id($File::Next::name) };
            my ( undef, $dirname ) = File::Spec->splitpath($File::Next::name);
        return 0 if -p $File::Next::name;
                App::Ack::warn( "${File::Next::name}: cannot open file for reading" );
        my $resource = App::Ack::Resource::Basic->new($File::Next::name);
        return File::Next::reslash( $filename );
        File::Next::files( {
        File::Next::from_file( {

squash is having some problem that isn't getting reported.

squarepegsys commented 10 years ago

OK, here is the build log in case it shows something useful.

https://www.strongspace.com/shared/b05nwcmbc7

Let me know if I can be of any more assistance.

karenetheridge commented 10 years ago

I just encountered these same errors while installing App::Ack into a new 5.19.7 install. Are you missing a prereq declaration on File::Next?

karenetheridge commented 10 years ago

might be useful - I have HARNESS_OPTIONS=j9 in my environment -- so some tests can fail randomly if you reuse temp directories or files across multiple tests. I recommend using a new File::Temp directory in every test file.

petdance commented 10 years ago

No, the prereq is fine. It's just that for some reason File::Next doesn't make it into the ack-standalone.

petdance commented 10 years ago

This has been fixed in 2.13_02. The Makefile.PL was relying on perldoc -l.