Skip to content

Commit e26bfd1

Browse files
oaldersclaude
andauthored
Fix GH#96: remove undeclared Try::Tiny dep, add non-blocking blead CI (#98)
* Remove undeclared Try::Tiny dependency from t/diag.t t/diag.t used Try::Tiny but it was never declared as a test prerequisite. On a freshly built perl that does not already have Try::Tiny installed (e.g. blead 5.45.1, as reported via IRC by @Tux), the toolchain does not pull it in, so t/diag.t dies at compile time ("Can't locate Try/Tiny.pm") and `make test` fails -- making the distribution appear not to install (GH#96). The two try{} blocks only swallowed exceptions around diagnostic Net::SSLeay version calls, so a plain eval { ...; 1 } or diag(...) is equivalent. This drops the dependency entirely instead of adding it to the prereqs, which keeps the test suite installable on minimal perls. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * CI: test on Perl blead (devel), non-blocking Add a container-based job using perldocker/perl-tester:devel (which tracks the latest Perl development release) so we get an early signal when the dist breaks on the upcoming Perl -- exactly the class of problem behind GH#96, which the stable CI matrix (topping out at 5.42) never exercised. The job deliberately has no continue-on-error: a failure shows up as a red X so it is visible. Keep it OUT of the required status checks in branch protection so blead breakage never blocks a merge -- we want the signal, not a gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 83516ee commit e26bfd1

2 files changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/dzil-build-and-test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,23 @@ jobs:
4848
run: cpan-install-dist-deps && test-dist
4949
env:
5050
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
51+
# Perl development version (blead). Informational only: a red X here means the
52+
# dist broke on the upcoming Perl (see GH#96, where it failed to install on
53+
# blead 5.45.1). Keep this OUT of the required status checks so it never
54+
# blocks a merge -- we want the signal, not a gate.
55+
blead-job:
56+
name: Perl blead (devel, non-blocking)
57+
needs: build-job
58+
runs-on: ubuntu-latest
59+
container:
60+
image: perldocker/perl-tester:devel
61+
steps:
62+
- uses: actions/download-artifact@v7
63+
with:
64+
name: build_dir
65+
path: .
66+
- name: Install deps and test on blead
67+
run: cpan-install-dist-deps && test-dist
5168
test-job:
5269
needs: build-job
5370
runs-on: ${{ matrix.os }}

t/diag.t

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use IO::Socket::SSL::Utils ();
1010
use Socket ();
1111
use Test::More import => [qw( diag done_testing pass subtest )];
1212
use Test::Needs;
13-
use Try::Tiny qw( try );
1413

1514
subtest 'openssl' => sub {
1615
test_needs 'Capture::Tiny';
@@ -28,18 +27,20 @@ subtest 'openssl' => sub {
2827

2928
subtest 'net_ssleay' => sub {
3029
test_needs 'Net::SSLeay';
31-
try {
30+
eval {
3231
diag(
3332
sprintf 'Net::SSLeay::OPENSSL_VERSION_NUMBER() 0x%08x',
3433
Net::SSLeay::OPENSSL_VERSION_NUMBER()
3534
);
36-
};
37-
try {
35+
1;
36+
} or diag("Net::SSLeay::OPENSSL_VERSION_NUMBER() unavailable: $@");
37+
eval {
3838
diag(
3939
sprintf 'Net::SSLeay::LIBRESSL_VERSION_NUMBER() 0x%08x',
4040
Net::SSLeay::LIBRESSL_VERSION_NUMBER()
4141
);
42-
};
42+
1;
43+
} or diag("Net::SSLeay::LIBRESSL_VERSION_NUMBER() unavailable: $@");
4344
pass('Net::SSLeay');
4445
};
4546

0 commit comments

Comments
 (0)