You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/12/02 19:35:35 UTC

[01/10] lucy git commit: Rework PAUSE exclusions

Repository: lucy
Updated Branches:
  refs/heads/0.6 764a88944 -> 8aafcd961
  refs/heads/master 05fc61872 -> 3c97420f7


Rework PAUSE exclusions

Remove class lists in Lucy::Redacted and `_gen_pause_exclusion_list`.
The generated `no_index` section was essentially ineffective, because
it was overridden by the auto-generated `provides` section. It was
also cluttered with files that wouldn't be indexed anyway.

Add `no_index` section manually in Build.PL. Since version 0.40_11,
this stops Module::Build from creating a `provides` section in the
CPAN META files. Add directories `sample` and `devel` to `no_index`
in order to stop MetaCPAN from indexing their contents.

Remove the custom `distmeta` action which checked version numbers in
.pm files and relied on the `provides` section being generated.

Part of LUCY-313.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/7512189b
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/7512189b
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/7512189b

Branch: refs/heads/0.6
Commit: 7512189ba7581c32ec0752f6111aa799a69b5da6
Parents: 764a889
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Nov 24 15:05:39 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:12:53 2016 +0100

----------------------------------------------------------------------
 perl/Build.PL                  |  4 ++
 perl/buildlib/Lucy/Build.pm    | 76 ++-----------------------------------
 perl/buildlib/Lucy/Redacted.pm | 63 ------------------------------
 3 files changed, 7 insertions(+), 136 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/7512189b/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index 3fddd54..f4484aa 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -55,6 +55,10 @@ my $builder = Lucy::Build->new(
         'Clownfish'          => 0.006000,
         'Clownfish::CFC'     => 0.006000,
     },
+    no_index => {
+        directory => [qw( buildlib devel sample )],
+        package   => [qw( Lucy::Test )],
+    },
     meta_merge => { keywords => [qw( search lucy lucene )], },
     meta_add   => {
         resources => {

http://git-wip-us.apache.org/repos/asf/lucy/blob/7512189b/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 87047ba..50a4ba5 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -216,20 +216,11 @@ limitations under the License.
 END_AUTOGEN
 }
 
-sub _check_module_build_for_dist {
-    eval "use Module::Build 0.38;";
-    die "./Build dist reqiures Module::Build 0.38 or higher--this is only "
-        . Module::Build->VERSION . $/ if $@;
-}
-
-sub ACTION_distdir {
-    _check_module_build_for_dist;
-    shift->SUPER::ACTION_distdir(@_);
-}
-
 sub ACTION_dist {
     my $self = shift;
-    _check_module_build_for_dist;
+
+    die("Module::Build 0.40_11 is required for ./Build dist")
+        if $Module::Build::VERSION < 0.40_11;
 
     # Create POD.
     $self->depends_on('pod');
@@ -263,10 +254,6 @@ sub ACTION_dist {
 
     move( "MANIFEST", "MANIFEST.bak" ) or die "move() failed: $!";
     $self->depends_on('manifest');
-    my $no_index = $self->_gen_pause_exclusion_list;
-    my $meta_add = $self->meta_add || {};
-    $meta_add->{no_index} = $no_index;
-    $self->meta_add( $meta_add );
     $self->SUPER::ACTION_dist;
 
     # Clean up.
@@ -277,63 +264,6 @@ sub ACTION_dist {
     move( "MANIFEST.bak", "MANIFEST" ) or die "move() failed: $!";
 }
 
-sub ACTION_distmeta {
-    my $self = shift;
-    $self->SUPER::ACTION_distmeta(@_);
-    # Make sure everything has a version.
-    require CPAN::Meta;
-    my $v = version->new($self->dist_version);
-    my $meta = CPAN::Meta->load_file('META.json');
-    my $provides = $meta->provides;
-    while (my ($pkg, $data) = each %{ $provides }) {
-        die "$pkg, defined in $data->{file}, has no version\n"
-            unless $data->{version};
-        die "$pkg, defined in $data->{file}, is "
-            . version->new($data->{version})->normal
-            . " but should be " . $v->normal . "\n"
-            unless $data->{version} == $v;
-    }
-}
-
-# Generate a list of files for PAUSE, search.cpan.org, etc to ignore.
-sub _gen_pause_exclusion_list {
-    my $self = shift;
-
-    # Only exclude files that are actually on-board.
-    open( my $man_fh, '<', 'MANIFEST' ) or die "Can't open MANIFEST: $!";
-    my @manifest_entries = <$man_fh>;
-    chomp @manifest_entries;
-
-    my @excluded_files;
-    for my $entry (@manifest_entries) {
-        # Allow README and Changes.
-        next if $entry =~ m#^(README|Changes)#;
-
-        # Allow public modules.
-        if ( $entry =~ m#^(perl/)?lib\b.+\.(pm|pod)$# ) {
-            open( my $fh, '<', $entry ) or die "Can't open '$entry': $!";
-            my $content = do { local $/; <$fh> };
-            next if $content =~ /=head1\s*NAME/;
-        }
-
-        # Disallow everything else.
-        push @excluded_files, $entry;
-    }
-
-    # Exclude redacted modules.
-    if ( eval { require "buildlib/Lucy/Redacted.pm" } ) {
-        my @redacted = map {
-            my @parts = split( /\W+/, $_ );
-            catfile( $LIB_DIR, @parts ) . '.pm'
-        } Lucy::Redacted->redacted, Lucy::Redacted->hidden;
-        push @excluded_files, @redacted;
-    }
-
-    my %uniquifier;
-    @excluded_files = sort grep { !$uniquifier{$_}++ } @excluded_files;
-    return { file => \@excluded_files };
-}
-
 sub ACTION_semiclean {
     my $self = shift;
     print "Cleaning up most build files.\n";

http://git-wip-us.apache.org/repos/asf/lucy/blob/7512189b/perl/buildlib/Lucy/Redacted.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Redacted.pm b/perl/buildlib/Lucy/Redacted.pm
deleted file mode 100644
index 21abca8..0000000
--- a/perl/buildlib/Lucy/Redacted.pm
+++ /dev/null
@@ -1,63 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-package Lucy::Redacted;
-
-our $VERSION = '0.006000';
-$VERSION = eval $VERSION;
-
-use Exporter 'import';
-our @EXPORT_OK = qw( list );
-
-# Return a partial list of Lucy classes which were once public but are
-# now either deprecated, removed, or moved.
-
-sub redacted {
-    return qw(
-        Lucy::Analysis::LCNormalizer
-        Lucy::Analysis::Token
-        Lucy::Analysis::TokenBatch
-        Lucy::Index::Term
-        Lucy::InvIndex
-        Lucy::InvIndexer
-        Lucy::Object::Obj
-        Lucy::QueryParser::QueryParser
-        Lucy::Search::BooleanQuery
-        Lucy::Search::QueryFilter
-        Lucy::Search::SearchServer
-        Lucy::Search::SearchClient
-    );
-}
-
-# Hide additional stuff from PAUSE and search.cpan.org.
-sub hidden {
-    return qw(
-        Lucy::Analysis::Inversion
-        Clownfish::Num
-        Lucy::Plan::Int32Type
-        Lucy::Plan::Int64Type
-        Lucy::Plan::Float32Type
-        Lucy::Plan::Float64Type
-        Lucy::Redacted
-        Lucy::Test::Object::TestCharBuf
-        Lucy::Test::TestUtils
-        Lucy::Util::BitVector
-    );
-}
-
-1;


[06/10] lucy git commit: Rework PAUSE exclusions

Posted by nw...@apache.org.
Rework PAUSE exclusions

Remove class lists in Lucy::Redacted and `_gen_pause_exclusion_list`.
The generated `no_index` section was essentially ineffective, because
it was overridden by the auto-generated `provides` section. It was
also cluttered with files that wouldn't be indexed anyway.

Add `no_index` section manually in Build.PL. Since version 0.40_11,
this stops Module::Build from creating a `provides` section in the
CPAN META files. Add directories `sample` and `devel` to `no_index`
in order to stop MetaCPAN from indexing their contents.

Remove the custom `distmeta` action which checked version numbers in
.pm files and relied on the `provides` section being generated.

Part of LUCY-313.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/71015909
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/71015909
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/71015909

Branch: refs/heads/master
Commit: 710159091b19149088cc77147006730f31931a25
Parents: 05fc618
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Nov 24 15:05:39 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:15:07 2016 +0100

----------------------------------------------------------------------
 perl/Build.PL                  |  4 ++
 perl/buildlib/Lucy/Build.pm    | 76 ++-----------------------------------
 perl/buildlib/Lucy/Redacted.pm | 63 ------------------------------
 3 files changed, 7 insertions(+), 136 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/71015909/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index 3fddd54..f4484aa 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -55,6 +55,10 @@ my $builder = Lucy::Build->new(
         'Clownfish'          => 0.006000,
         'Clownfish::CFC'     => 0.006000,
     },
+    no_index => {
+        directory => [qw( buildlib devel sample )],
+        package   => [qw( Lucy::Test )],
+    },
     meta_merge => { keywords => [qw( search lucy lucene )], },
     meta_add   => {
         resources => {

http://git-wip-us.apache.org/repos/asf/lucy/blob/71015909/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 87047ba..50a4ba5 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -216,20 +216,11 @@ limitations under the License.
 END_AUTOGEN
 }
 
-sub _check_module_build_for_dist {
-    eval "use Module::Build 0.38;";
-    die "./Build dist reqiures Module::Build 0.38 or higher--this is only "
-        . Module::Build->VERSION . $/ if $@;
-}
-
-sub ACTION_distdir {
-    _check_module_build_for_dist;
-    shift->SUPER::ACTION_distdir(@_);
-}
-
 sub ACTION_dist {
     my $self = shift;
-    _check_module_build_for_dist;
+
+    die("Module::Build 0.40_11 is required for ./Build dist")
+        if $Module::Build::VERSION < 0.40_11;
 
     # Create POD.
     $self->depends_on('pod');
@@ -263,10 +254,6 @@ sub ACTION_dist {
 
     move( "MANIFEST", "MANIFEST.bak" ) or die "move() failed: $!";
     $self->depends_on('manifest');
-    my $no_index = $self->_gen_pause_exclusion_list;
-    my $meta_add = $self->meta_add || {};
-    $meta_add->{no_index} = $no_index;
-    $self->meta_add( $meta_add );
     $self->SUPER::ACTION_dist;
 
     # Clean up.
@@ -277,63 +264,6 @@ sub ACTION_dist {
     move( "MANIFEST.bak", "MANIFEST" ) or die "move() failed: $!";
 }
 
-sub ACTION_distmeta {
-    my $self = shift;
-    $self->SUPER::ACTION_distmeta(@_);
-    # Make sure everything has a version.
-    require CPAN::Meta;
-    my $v = version->new($self->dist_version);
-    my $meta = CPAN::Meta->load_file('META.json');
-    my $provides = $meta->provides;
-    while (my ($pkg, $data) = each %{ $provides }) {
-        die "$pkg, defined in $data->{file}, has no version\n"
-            unless $data->{version};
-        die "$pkg, defined in $data->{file}, is "
-            . version->new($data->{version})->normal
-            . " but should be " . $v->normal . "\n"
-            unless $data->{version} == $v;
-    }
-}
-
-# Generate a list of files for PAUSE, search.cpan.org, etc to ignore.
-sub _gen_pause_exclusion_list {
-    my $self = shift;
-
-    # Only exclude files that are actually on-board.
-    open( my $man_fh, '<', 'MANIFEST' ) or die "Can't open MANIFEST: $!";
-    my @manifest_entries = <$man_fh>;
-    chomp @manifest_entries;
-
-    my @excluded_files;
-    for my $entry (@manifest_entries) {
-        # Allow README and Changes.
-        next if $entry =~ m#^(README|Changes)#;
-
-        # Allow public modules.
-        if ( $entry =~ m#^(perl/)?lib\b.+\.(pm|pod)$# ) {
-            open( my $fh, '<', $entry ) or die "Can't open '$entry': $!";
-            my $content = do { local $/; <$fh> };
-            next if $content =~ /=head1\s*NAME/;
-        }
-
-        # Disallow everything else.
-        push @excluded_files, $entry;
-    }
-
-    # Exclude redacted modules.
-    if ( eval { require "buildlib/Lucy/Redacted.pm" } ) {
-        my @redacted = map {
-            my @parts = split( /\W+/, $_ );
-            catfile( $LIB_DIR, @parts ) . '.pm'
-        } Lucy::Redacted->redacted, Lucy::Redacted->hidden;
-        push @excluded_files, @redacted;
-    }
-
-    my %uniquifier;
-    @excluded_files = sort grep { !$uniquifier{$_}++ } @excluded_files;
-    return { file => \@excluded_files };
-}
-
 sub ACTION_semiclean {
     my $self = shift;
     print "Cleaning up most build files.\n";

http://git-wip-us.apache.org/repos/asf/lucy/blob/71015909/perl/buildlib/Lucy/Redacted.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Redacted.pm b/perl/buildlib/Lucy/Redacted.pm
deleted file mode 100644
index 21abca8..0000000
--- a/perl/buildlib/Lucy/Redacted.pm
+++ /dev/null
@@ -1,63 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-package Lucy::Redacted;
-
-our $VERSION = '0.006000';
-$VERSION = eval $VERSION;
-
-use Exporter 'import';
-our @EXPORT_OK = qw( list );
-
-# Return a partial list of Lucy classes which were once public but are
-# now either deprecated, removed, or moved.
-
-sub redacted {
-    return qw(
-        Lucy::Analysis::LCNormalizer
-        Lucy::Analysis::Token
-        Lucy::Analysis::TokenBatch
-        Lucy::Index::Term
-        Lucy::InvIndex
-        Lucy::InvIndexer
-        Lucy::Object::Obj
-        Lucy::QueryParser::QueryParser
-        Lucy::Search::BooleanQuery
-        Lucy::Search::QueryFilter
-        Lucy::Search::SearchServer
-        Lucy::Search::SearchClient
-    );
-}
-
-# Hide additional stuff from PAUSE and search.cpan.org.
-sub hidden {
-    return qw(
-        Lucy::Analysis::Inversion
-        Clownfish::Num
-        Lucy::Plan::Int32Type
-        Lucy::Plan::Int64Type
-        Lucy::Plan::Float32Type
-        Lucy::Plan::Float64Type
-        Lucy::Redacted
-        Lucy::Test::Object::TestCharBuf
-        Lucy::Test::TestUtils
-        Lucy::Util::BitVector
-    );
-}
-
-1;


[02/10] lucy git commit: Support X.Y.Z.D Perl versions

Posted by nw...@apache.org.
Support X.Y.Z.D Perl versions


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/47654ee5
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/47654ee5
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/47654ee5

Branch: refs/heads/0.6
Commit: 47654ee58bf42e910dfa8304c28fd618626ffbbb
Parents: 7512189
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Nov 24 15:31:14 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:13:04 2016 +0100

----------------------------------------------------------------------
 devel/bin/update_version | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/47654ee5/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index 5adaadb..35c8dd0 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -28,28 +28,33 @@ my $usage = "$0 version\n";
 my $version = shift(@ARGV) or die $usage;
 
 # standardize version strings
-my ( $x, $y, $z, $dev );
+my ( $x, $y, $z, $dev_sep, $dev );
 if ( $version =~ m/^(\d+)\.(\d+)\.(\d+)$/ ) {
     ( $x, $y, $z, $dev ) = ( $1, $2, $3, 0 );
 }
-elsif ( $version =~ m/^(\d+)\.(\d+)\.(\d+)_(\d+)$/ ) {
-    ( $x, $y, $z, $dev ) = ( $1, $2, $3, $4 );
+elsif ( $version =~ m/^(\d+)\.(\d+)\.(\d+)([._])(\d+)$/ ) {
+    ( $x, $y, $z, $dev_sep, $dev ) = ( $1, $2, $3, $4, $5 );
 }
 elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)$/ ) {
     ( $x, $y, $z, $dev ) = ( int($1), int($2), int($3), 0 );
 }
-elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)_(\d\d\d)$/ ) {
-    ( $x, $y, $z, $dev ) = ( int($1), int($2), int($3), int($4) );
+elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)(_)?(\d\d\d)$/ ) {
+    ( $x, $y, $z, $dev_sep, $dev )
+        = ( int($1), int($2), int($3), defined($4) ? $4 : '.', int($5) );
 }
 else {
     die "Unknown version syntax. Try X.Y.Z or X.YYYZZZ\n";
 }
 my $x_y_z_version    = sprintf( "%d.%d.%d", $x, $y, $z );
 my $x_y_z_d_version  = $dev
-                       ? sprintf( "%d.%d.%d_%d", $x, $y, $z, $dev )
+                       ? $dev_sep eq '_'
+                         ? sprintf( "%d.%d.%d_%d", $x, $y, $z, $dev )
+                         : sprintf( "%d.%d.%d.%d", $x, $y, $z, $dev )
                        : sprintf( "%d.%d.%d", $x, $y, $z );
 my $x_yyyzzz_version = $dev
-                       ? sprintf( "%d.%03d%03d_%03d", $x, $y, $z, $dev )
+                       ? $dev_sep eq '_'
+                         ? sprintf( "%d.%03d%03d_%03d", $x, $y, $z, $dev )
+                         : sprintf( "%d.%03d%03d%03d", $x, $y, $z, $dev )
                        : sprintf( "%d.%03d%03d", $x, $y, $z );
 
 print "Using version: $x_y_z_version ( $x_yyyzzz_version )\n";


[09/10] lucy git commit: Ignore CPAN Testers forcing parallel tests

Posted by nw...@apache.org.
Ignore CPAN Testers forcing parallel tests

Parallel tests are known to fail (LUCY-260).


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/355a13d9
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/355a13d9
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/355a13d9

Branch: refs/heads/master
Commit: 355a13d9870b44d32438dd690f317bf9628e5382
Parents: a8f7e9c
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 30 20:15:59 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:15:32 2016 +0100

----------------------------------------------------------------------
 perl/Build.PL | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/355a13d9/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index f4484aa..5ca28c9 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -20,6 +20,16 @@ use lib 'buildlib';
 use File::Spec::Functions qw( catdir updir );
 use Lucy::Build;
 
+# Don't create FAIL reports from CPAN Testers that force parallel tests.
+# See LUCY-260.
+if ( $ENV{AUTOMATED_TESTING}
+     && $ENV{HARNESS_OPTIONS} =~ /(?:^|:)j(\d*)/
+     && ($1 || 9) > 1
+   ) {
+    print STDERR "Parallel testing is known to fail.\n";
+    exit;
+}
+
 my $IS_CPAN_DIST = -e 'cfcore';
 my $CORE_SOURCE_DIR;
 my $TEST_SOURCE_DIR;


[08/10] lucy git commit: Remove ELAST from ErrorMessage

Posted by nw...@apache.org.
Remove ELAST from ErrorMessage

ELAST isn't an actual error code and causes conflicts.

Fixes LUCY-317.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/a8f7e9c6
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/a8f7e9c6
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/a8f7e9c6

Branch: refs/heads/master
Commit: a8f7e9c6076652c31013d2d2523bcd236c4a9526
Parents: 6513de0
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Nov 29 10:54:26 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:15:22 2016 +0100

----------------------------------------------------------------------
 core/Lucy/Store/ErrorMessage.c | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/a8f7e9c6/core/Lucy/Store/ErrorMessage.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/ErrorMessage.c b/core/Lucy/Store/ErrorMessage.c
index e5d95f6..3c66dbe 100644
--- a/core/Lucy/Store/ErrorMessage.c
+++ b/core/Lucy/Store/ErrorMessage.c
@@ -785,11 +785,6 @@ ErrMsg_strerror(int my_errno) {
             msg = "Inappropriate file type or format";
             break;
 #endif
-#ifdef ELAST
-        case ELAST:
-            msg = "Must be equal largest errno";
-            break;
-#endif
 #ifdef ENEEDAUTH
         case ENEEDAUTH:
             msg = "Need authenticator";


[10/10] lucy git commit: Ignore exceptions in SearchClient dtor

Posted by nw...@apache.org.
Ignore exceptions in SearchClient dtor

Fixes LUCY-286.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/3c97420f
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/3c97420f
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/3c97420f

Branch: refs/heads/master
Commit: 3c97420f70f92c0f5a9cdf3cee707e5cfa9a98b4
Parents: 355a13d
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 30 20:19:36 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:15:39 2016 +0100

----------------------------------------------------------------------
 perl/lib/LucyX/Remote/SearchClient.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/3c97420f/perl/lib/LucyX/Remote/SearchClient.pm
----------------------------------------------------------------------
diff --git a/perl/lib/LucyX/Remote/SearchClient.pm b/perl/lib/LucyX/Remote/SearchClient.pm
index cfcbb73..abde423 100644
--- a/perl/lib/LucyX/Remote/SearchClient.pm
+++ b/perl/lib/LucyX/Remote/SearchClient.pm
@@ -51,7 +51,12 @@ sub new {
 
 sub DESTROY {
     my $self = shift;
-    $self->close if defined $sock{$$self};
+    if ( defined $sock{$$self} ) {
+        # Ignore exceptions in destructor.
+        eval {
+            $self->close;
+        };
+    }
     delete $peer_address{$$self};
     delete $sock{$$self};
     $self->SUPER::DESTROY;


[03/10] lucy git commit: Remove ELAST from ErrorMessage

Posted by nw...@apache.org.
Remove ELAST from ErrorMessage

ELAST isn't an actual error code and causes conflicts.

Fixes LUCY-317.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c58b432a
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c58b432a
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c58b432a

Branch: refs/heads/0.6
Commit: c58b432a665f4b22bcf1955dc7af7acf4361586e
Parents: 47654ee
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Nov 29 10:54:26 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:13:12 2016 +0100

----------------------------------------------------------------------
 core/Lucy/Store/ErrorMessage.c | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/c58b432a/core/Lucy/Store/ErrorMessage.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/ErrorMessage.c b/core/Lucy/Store/ErrorMessage.c
index e5d95f6..3c66dbe 100644
--- a/core/Lucy/Store/ErrorMessage.c
+++ b/core/Lucy/Store/ErrorMessage.c
@@ -785,11 +785,6 @@ ErrMsg_strerror(int my_errno) {
             msg = "Inappropriate file type or format";
             break;
 #endif
-#ifdef ELAST
-        case ELAST:
-            msg = "Must be equal largest errno";
-            break;
-#endif
 #ifdef ENEEDAUTH
         case ENEEDAUTH:
             msg = "Need authenticator";


[07/10] lucy git commit: Support X.Y.Z.D Perl versions

Posted by nw...@apache.org.
Support X.Y.Z.D Perl versions


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6513de06
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6513de06
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6513de06

Branch: refs/heads/master
Commit: 6513de06954cd41f99345bde513cf6ce6faed078
Parents: 7101590
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Nov 24 15:31:14 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:15:14 2016 +0100

----------------------------------------------------------------------
 devel/bin/update_version | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/6513de06/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index 5adaadb..35c8dd0 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -28,28 +28,33 @@ my $usage = "$0 version\n";
 my $version = shift(@ARGV) or die $usage;
 
 # standardize version strings
-my ( $x, $y, $z, $dev );
+my ( $x, $y, $z, $dev_sep, $dev );
 if ( $version =~ m/^(\d+)\.(\d+)\.(\d+)$/ ) {
     ( $x, $y, $z, $dev ) = ( $1, $2, $3, 0 );
 }
-elsif ( $version =~ m/^(\d+)\.(\d+)\.(\d+)_(\d+)$/ ) {
-    ( $x, $y, $z, $dev ) = ( $1, $2, $3, $4 );
+elsif ( $version =~ m/^(\d+)\.(\d+)\.(\d+)([._])(\d+)$/ ) {
+    ( $x, $y, $z, $dev_sep, $dev ) = ( $1, $2, $3, $4, $5 );
 }
 elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)$/ ) {
     ( $x, $y, $z, $dev ) = ( int($1), int($2), int($3), 0 );
 }
-elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)_(\d\d\d)$/ ) {
-    ( $x, $y, $z, $dev ) = ( int($1), int($2), int($3), int($4) );
+elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)(_)?(\d\d\d)$/ ) {
+    ( $x, $y, $z, $dev_sep, $dev )
+        = ( int($1), int($2), int($3), defined($4) ? $4 : '.', int($5) );
 }
 else {
     die "Unknown version syntax. Try X.Y.Z or X.YYYZZZ\n";
 }
 my $x_y_z_version    = sprintf( "%d.%d.%d", $x, $y, $z );
 my $x_y_z_d_version  = $dev
-                       ? sprintf( "%d.%d.%d_%d", $x, $y, $z, $dev )
+                       ? $dev_sep eq '_'
+                         ? sprintf( "%d.%d.%d_%d", $x, $y, $z, $dev )
+                         : sprintf( "%d.%d.%d.%d", $x, $y, $z, $dev )
                        : sprintf( "%d.%d.%d", $x, $y, $z );
 my $x_yyyzzz_version = $dev
-                       ? sprintf( "%d.%03d%03d_%03d", $x, $y, $z, $dev )
+                       ? $dev_sep eq '_'
+                         ? sprintf( "%d.%03d%03d_%03d", $x, $y, $z, $dev )
+                         : sprintf( "%d.%03d%03d%03d", $x, $y, $z, $dev )
                        : sprintf( "%d.%03d%03d", $x, $y, $z );
 
 print "Using version: $x_y_z_version ( $x_yyyzzz_version )\n";


[04/10] lucy git commit: Ignore CPAN Testers forcing parallel tests

Posted by nw...@apache.org.
Ignore CPAN Testers forcing parallel tests

Parallel tests are known to fail (LUCY-260).


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/22b11ac7
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/22b11ac7
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/22b11ac7

Branch: refs/heads/0.6
Commit: 22b11ac7ef66e23b68b32dc1afb48af76720eb97
Parents: c58b432
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 30 20:15:59 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:13:21 2016 +0100

----------------------------------------------------------------------
 perl/Build.PL | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/22b11ac7/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index f4484aa..5ca28c9 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -20,6 +20,16 @@ use lib 'buildlib';
 use File::Spec::Functions qw( catdir updir );
 use Lucy::Build;
 
+# Don't create FAIL reports from CPAN Testers that force parallel tests.
+# See LUCY-260.
+if ( $ENV{AUTOMATED_TESTING}
+     && $ENV{HARNESS_OPTIONS} =~ /(?:^|:)j(\d*)/
+     && ($1 || 9) > 1
+   ) {
+    print STDERR "Parallel testing is known to fail.\n";
+    exit;
+}
+
 my $IS_CPAN_DIST = -e 'cfcore';
 my $CORE_SOURCE_DIR;
 my $TEST_SOURCE_DIR;


[05/10] lucy git commit: Ignore exceptions in SearchClient dtor

Posted by nw...@apache.org.
Ignore exceptions in SearchClient dtor

Fixes LUCY-286.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8aafcd96
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8aafcd96
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8aafcd96

Branch: refs/heads/0.6
Commit: 8aafcd961c7d1c5338de424907b769f4453500e6
Parents: 22b11ac
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 30 20:19:36 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Dec 2 20:13:43 2016 +0100

----------------------------------------------------------------------
 perl/lib/LucyX/Remote/SearchClient.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/8aafcd96/perl/lib/LucyX/Remote/SearchClient.pm
----------------------------------------------------------------------
diff --git a/perl/lib/LucyX/Remote/SearchClient.pm b/perl/lib/LucyX/Remote/SearchClient.pm
index cfcbb73..abde423 100644
--- a/perl/lib/LucyX/Remote/SearchClient.pm
+++ b/perl/lib/LucyX/Remote/SearchClient.pm
@@ -51,7 +51,12 @@ sub new {
 
 sub DESTROY {
     my $self = shift;
-    $self->close if defined $sock{$$self};
+    if ( defined $sock{$$self} ) {
+        # Ignore exceptions in destructor.
+        eval {
+            $self->close;
+        };
+    }
     delete $peer_address{$$self};
     delete $sock{$$self};
     $self->SUPER::DESTROY;