Skip to content

Commit

Permalink
show notice about old devel version exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
eserte committed Jul 14, 2024
1 parent ccdef01 commit 569a873
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions cgi-bin/cpantestersmatrix.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package # not official yet
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = '2.56';
$VERSION = '2.57';

use vars qw($UA);

Expand Down Expand Up @@ -254,6 +254,7 @@ package # not official yet

my $first_report_epoch;
my $last_report_epoch;
my $excluded_old_devel;

if ((defined $dist && $dist =~ /[<>&]/) ||
(defined $author && $author =~ /[<>&]/)) {
Expand Down Expand Up @@ -285,7 +286,7 @@ package # not official yet
my($perl, $patch) = eval { get_perl_and_patch($rec) };
next if !$perl;
next if defined $want_perl && $perl ne $want_perl;
next if $prefs{exclude_old_devel} && is_old_devel_perl($perl);
do { $excluded_old_devel = 1; next } if $prefs{exclude_old_devel} && is_old_devel_perl($perl);
next if defined $want_os && ($rec->{osname}//'') ne $want_os;
push @reports, $rec;
$rec->{patch} = $patch;
Expand Down Expand Up @@ -441,6 +442,7 @@ package # not official yet
$table = $r->{table};
$ct_link = $r->{ct_link};
$dist_title = ": $r->{title}";
$excluded_old_devel = $r->{excluded_old_devel};
};
$error = $@ if $@;
}
Expand Down Expand Up @@ -694,6 +696,7 @@ package # not official yet

if ($table) {
$table->print;
excluded_old_devel_notice() if $excluded_old_devel;
}

if (USE_JQUERY_TABLESORTER) {
Expand All @@ -718,7 +721,9 @@ package # not official yet
for my $r (@$tables) {
print qq{<h2><a href="$r->{ct_link}" name="$r->{anchor}">$r->{title}</a></h2>};
print $r->{table};
excluded_old_devel_notice() if $r->{excluded_old_devel};
}

}

print <<EOF;
Expand All @@ -741,6 +746,7 @@ package # not official yet

if ($table) {
$table->print;
excluded_old_devel_notice() if $excluded_old_devel;
}

if ($table) {
Expand Down Expand Up @@ -1323,8 +1329,9 @@ ($$$)
my @matrix;
my %acts_per_perl; # perl -> act -> count
my %acts_per_osname; # osname -> act -> count
my $excluded_old_devel;
for my $perl (@perls) {
next if $prefs{exclude_old_devel} && is_old_devel_perl($perl);
do { $excluded_old_devel = 1; next } if $prefs{exclude_old_devel} && is_old_devel_perl($perl);
my @row;
for my $osname (@osnames) {
my $acts = $action{$perl}->{$osname};
Expand Down Expand Up @@ -1393,7 +1400,8 @@ ($$$)
first_report_date => $first_report_date,
last_report_date => $last_report_date,
total_actions => \%total_actions,
total_configurations => sum map { scalar values %$_ } values %action,
total_configurations => (sum map { scalar values %$_ } values %action),
excluded_old_devel => $excluded_old_devel,
};
}

Expand Down Expand Up @@ -2189,6 +2197,14 @@ ($)
sprintf "\nReusing old cached file, %.1f day%s old\n", $days, $days != 1 ? 's' : '';
}

sub excluded_old_devel_notice {
print <<EOF;
<div style="margin-bottom:0.5cm; font-size:smaller; ">
<b>Note</b>: results for old devel perls were excluded by preference (current stable perl: $current_stable_perl).
</div>
EOF
}

{
package # do not index
CPAN::Testers::Matrix::LockFile;
Expand Down

0 comments on commit 569a873

Please sign in to comment.