Skip to content

Perl - CPAN Always Registered as Required Command - #2314

Merged
aaronpowell merged 1 commit into
CommunityToolkit:mainfrom
Omnideth:perl-cpan-always-required
Nov 2, 2026
Merged

aaronpowell merged 1 commit into
CommunityToolkit:mainfrom
Omnideth:perl-cpan-always-required

Conversation

@Omnideth

Copy link
Copy Markdown
Contributor

Closes #2313

Check cpan availability only for installers configured to invoke it. Do not warn about
missing cpan for runtime-only resources or installers using cpanm or Carton.
Preserve the existing warning-only validation behavior.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Copilot AI balanced review requested due to automatic review settings October 28, 2026 04:07
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2314

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2314"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the change to installer-specific command validation.

No open issues 🎉

What changed in this PR

Fixes #2313 by moving CPAN availability checks from all Perl applications to installers that actually invoke it, preserving warning-only validation.

Changes:

  • Validate each installer’s selected command, including its resolved perlbrew path.
  • Add regression coverage for runtime-only resources, package-manager selection, validation timing, and publish mode.
  • Document when installer commands are checked and how missing-command warnings behave.
File Description
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​WithPerlbrewExtensionTests.cs Updates perlbrew expectations to exclude unconditional CPAN checks.
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​ValidationMessagingTests.cs Tests resolved installer paths and pre-start warning notifications.
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​RegistrationAndCommandTests.cs Covers runtime-only resources, installer selection, and configuration order.
tests/​CommunityToolkit.Aspire.Hosting.Perl.Tests/​PublishModeWiringTests.cs Verifies publish-mode resources do not require CPAN.
src/​CommunityToolkit.Aspire.Hosting.Perl/​README.md Explains installer-specific checks and warning-only behavior.
src/​CommunityToolkit.Aspire.Hosting.Perl/​PerlAppResourceBuilderExtensions.PackageManager.cs Registers the resolved installer command with its installation help link.
src/​CommunityToolkit.Aspire.Hosting.Perl/​PerlAppResourceBuilderExtensions.cs Removes unconditional CPAN registration from Perl applications.

Review effort: Balanced

@Omnideth
Omnideth force-pushed the perl-cpan-always-required branch from 84540a3 to 1fab098 Compare October 31, 2026 03:26
@aaronpowell
aaronpowell merged commit c082998 into CommunityToolkit:main Nov 2, 2026
16 checks passed
@Omnideth
Omnideth deleted the perl-cpan-always-required branch November 3, 2026 05:17
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.

Perl - CPAN Always Registered as Required Command

3 participants