Skip to content

fix: handle Test2::Harness::Util::IPC deprecation#338

Draft
Koan-Bot wants to merge 2 commits intocpan-authors:mainfrom
atoomic:koan.atoomic/fix-test-harness-ipc-deprecation
Draft

fix: handle Test2::Harness::Util::IPC deprecation#338
Koan-Bot wants to merge 2 commits intocpan-authors:mainfrom
atoomic:koan.atoomic/fix-test-harness-ipc-deprecation

Conversation

@Koan-Bot
Copy link
Copy Markdown
Contributor

@Koan-Bot Koan-Bot commented Mar 29, 2026

What

Fix Test::TMF test helper to handle deprecated/broken Test2::Harness IPC module gracefully.

Why

Test2::Harness::Util::IPC was deprecated in favor of Test2::Harness::IPC::Util. Docker images for perldocker/perl-tester have been updated, causing t/import.t, t/plugin.t, and t/trace.t to crash (exit 255) across all Perl versions in CI. This blocks all 34 open PRs and also affects cpanel-perl builds (issue #325).

On Perl 5.20 specifically, the old module exists as a broken deprecation shim and the new one isn't installed — neither can be loaded.

How

  1. Try the new module name first, fall back to old name
  2. If neither loads, set $RUN_CMD_AVAILABLE = 0 instead of dying
  3. Custom import() calls plan(skip_all => ...) when run_cmd is unavailable — tests skip gracefully rather than failing the build

Testing

  • disttest/ubuntu: now pass (previously blocked by IPC module crash)
  • Perl 5.20: tests skip with clear message instead of exit 255
  • All other Perl versions: should use the new module name normally

Fixes #325.


🤖 Generated with Claude Code

Test2::Harness::Util::IPC was deprecated and replaced by
Test2::Harness::IPC::Util in newer versions. On cpanel-perl 5.42,
the deprecated module dies at compile time, causing import.t, plugin.t,
and trace.t to fail.

Try the new module first, fall back to the old one.

Closes cpan-authors#325

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Koan-Bot
Copy link
Copy Markdown
Contributor Author

CI Impact Note: This PR fixes a systemic CI failure affecting all 34 open PRs. The perldocker/perl-tester Docker images have been updated with a newer Test2::Harness that renames Test2::Harness::Util::IPC to Test2::Harness::IPC::Util. Since this fix wasn't in main when images updated (~early April 2026), every PR branch now fails the t/import.t, t/plugin.t, and t/trace.t tests.

Merging this would unblock CI across the board (after rebasing the affected branches).

On Perl 5.20 Docker images, the old Test2::Harness::Util::IPC is now a
broken deprecation shim (fails to compile) and the replacement
Test2::Harness::IPC::Util isn't installed. This caused t/import.t,
t/plugin.t, and t/trace.t to crash with exit 255 on 5.20 (and other
Perl versions as images update).

Instead of dying when neither module is available, set a flag and have
Test::TMF's import() plan skip_all so dependent tests are gracefully
skipped rather than failing the entire test suite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fail on cpanel-perl

1 participant