Skip to content

Revert "Replace Semver NuGet package with internal SmolSemVer implementation (#16033)"#16156

Merged
eerhardt merged 2 commits into
microsoft:mainfrom
eerhardt:UseSemVerAgain
Apr 14, 2026
Merged

Revert "Replace Semver NuGet package with internal SmolSemVer implementation (#16033)"#16156
eerhardt merged 2 commits into
microsoft:mainfrom
eerhardt:UseSemVerAgain

Conversation

@eerhardt
Copy link
Copy Markdown
Member

Now that Enable NuGet signature verification for aspire-managed on Linux (microsoft/aspire#16049) was merged, we can revert back to using the SemVer nuget package again.

I'll run the deployment tests to ensure they still work correctly.

Copilot AI review requested due to automatic review settings April 14, 2026 15:14
@eerhardt
Copy link
Copy Markdown
Member Author

/deployment-test

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Reverts the previous internal SmolSemVer implementation and switches the repo back to consuming the Semver NuGet package for semantic version parsing/comparison.

Changes:

  • Removes the shared SmolSemVer.cs implementation and its dedicated test project.
  • Adds Semver package references and updates call sites to use Semver.SemVersion APIs.
  • Adjusts version comparison logic in shared helpers and various CLI/Hosting components.

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Aspire.SmolSemVer.Tests/SmolSemVerTests.cs Removes tests tied to the deleted internal SmolSemVer implementation.
tests/Aspire.SmolSemVer.Tests/Aspire.SmolSemVer.Tests.csproj Removes the standalone SmolSemVer test project.
tests/Aspire.Hosting.Tests/VersionChecking/VersionCheckServiceTests.cs Adds Semver import for tests using semantic versions.
tests/Aspire.Hosting.Tests/VersionChecking/PackageUpdateHelpersTests.cs Updates prerelease construction to match Semver package API.
tests/Aspire.Cli.Tests/Utils/CliUpdateNotificationServiceTests.cs Adds Semver import for CLI update tests.
tests/Aspire.Cli.Tests/Utils/AppHostHelperTests.cs Removes an AppHost compatibility version-checking theory test.
tests/Aspire.Cli.Tests/TestServices/FakePlaywrightServices.cs Adds Semver import for Playwright test services.
tests/Aspire.Cli.Tests/Packaging/PackagingServiceTests.cs Uses Semver parsing to filter prerelease/stable packages.
tests/Aspire.Cli.Tests/DotNetSdkInstallerTests.cs Adds Semver import for SDK installer tests.
tests/Aspire.Cli.Tests/Agents/VsCodeAgentEnvironmentScannerTests.cs Adds Semver import for agent scanner tests.
tests/Aspire.Cli.Tests/Agents/PlaywrightCliInstallerTests.cs Adds Semver import for installer tests.
tests/Aspire.Cli.Tests/Agents/OpenCodeAgentEnvironmentScannerTests.cs Adds Semver import for agent scanner tests.
tests/Aspire.Cli.Tests/Agents/CopilotCliAgentEnvironmentScannerTests.cs Adds Semver import for agent scanner tests.
tests/Aspire.Cli.Tests/Agents/ClaudeCodeAgentEnvironmentScannerTests.cs Adds Semver import for agent scanner tests.
src/Shared/SmolSemVer.cs Deletes the internal SmolSemVer implementation.
src/Shared/PackageUpdateHelpers.cs Switches version comparisons to Semver precedence comparisons.
src/Shared/NpmVersionHelper.cs Adds Semver import (to support Semver usage in this helper).
src/Aspire.Hosting/VersionChecking/VersionCheckService.cs Replaces comparisons against internal SemVersion with Semver-based comparisons.
src/Aspire.Hosting/VersionChecking/PackageVersionProvider.cs Adds Semver import for version provider types/APIs.
src/Aspire.Hosting/VersionChecking/IPackageVersionProvider.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Hosting/Aspire.Hosting.csproj Removes SmolSemVer link and adds Semver package reference.
src/Aspire.Hosting.Kubernetes/HelmChartOptions.cs Uses Semver parsing for Helm chart version validation.
src/Aspire.Hosting.CodeGeneration.TypeScript/Aspire.Hosting.CodeGeneration.TypeScript.csproj Removes SmolSemVer link and adds Semver package reference.
src/Aspire.Cli/Utils/CliUpdateNotifier.cs Adds Semver import for update notification logic.
src/Aspire.Cli/Utils/AppHostHelper.cs Uses Semver precedence comparison for compatibility checks.
src/Aspire.Cli/Templating/DotNetTemplateFactory.cs Adds Semver import for template selection/versioning operations.
src/Aspire.Cli/Projects/ProjectUpdater.cs Adds Semver import for project update/version logic.
src/Aspire.Cli/Projects/GuestAppHostProject.cs Adds Semver import for app host version logic.
src/Aspire.Cli/Packaging/PackageChannel.cs Adds Semver import for channel/version handling.
src/Aspire.Cli/OpenCode/OpenCodeCliRunner.cs Adds Semver import for OpenCode version parsing/comparison.
src/Aspire.Cli/OpenCode/IOpenCodeCliRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Npm/NpmRunner.cs Adds Semver import for npm/version operations.
src/Aspire.Cli/Npm/INpmRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Mcp/Tools/ListIntegrationsTool.cs Adds Semver import for tooling that uses version evaluation.
src/Aspire.Cli/DotNet/DotNetSdkInstaller.cs Replaces internal version comparisons with Semver-based comparisons.
src/Aspire.Cli/Commands/Sdk/SdkDumpCommand.cs Adds Semver import for SDK dump/version logic.
src/Aspire.Cli/Commands/NewCommand.cs Uses Semver parsing and ordering for template package selection.
src/Aspire.Cli/Commands/InitCommand.cs Uses Semver precedence comparisons when selecting TFMs/versions.
src/Aspire.Cli/Commands/AddCommand.cs Adds Semver import for add-command version logic.
src/Aspire.Cli/Aspire.Cli.csproj Removes SmolSemVer link and adds Semver package reference.
src/Aspire.Cli/Agents/VsCode/VsCodeCliRunner.cs Adds Semver import for agent runner version handling.
src/Aspire.Cli/Agents/VsCode/IVsCodeCliRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Agents/Playwright/PlaywrightCliRunner.cs Adds Semver import for Playwright runner versioning.
src/Aspire.Cli/Agents/Playwright/PlaywrightCliInstaller.cs Switches installer logic to Semver precedence comparisons.
src/Aspire.Cli/Agents/Playwright/IPlaywrightCliRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Agents/OpenCode/OpenCodeCliRunner.cs Adds Semver import for agent runner version handling.
src/Aspire.Cli/Agents/OpenCode/IOpenCodeCliRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Agents/CopilotCli/ICopilotCliRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Agents/CopilotCli/CopilotCliRunner.cs Adds Semver import for agent runner version handling.
src/Aspire.Cli/Agents/ClaudeCode/IClaudeCodeCliRunner.cs Adds Semver import for interface signatures using Semver types.
src/Aspire.Cli/Agents/ClaudeCode/ClaudeCodeCliRunner.cs Adds Semver import for agent runner version handling.
Directory.Packages.props Adds the Semver package version to central package management.
Aspire.slnx Removes the SmolSemVer test project from the solution.
Comments suppressed due to low confidence (3)

src/Aspire.Hosting/VersionChecking/VersionCheckService.cs:1

  • SemVersion.ComparePrecedence(...) is not part of the commonly exposed Semver (Semver.SemVersion) API surface (the package typically provides ComparePrecedenceTo(...) and/or SemVersion.PrecedenceComparer). This is likely a compile break; since you already guard for nulls, use version1.ComparePrecedenceTo(version2) (or SemVersion.PrecedenceComparer.Compare(version1, version2)), then compare the returned int.
    src/Aspire.Cli/Commands/InitCommand.cs:933
  • SemVersion.ComparePrecedence(...) is likely not a real Semver API and may not compile. Since highestVersion is non-null in the comparison path, use version.ComparePrecedenceTo(highestVersion) > 0 (or SemVersion.PrecedenceComparer.Compare(version, highestVersion) > 0).
                    if (SemVersion.TryParse(versionString, SemVersionStyles.Strict, out var version))
                    {
                        if (highestVersion is null || SemVersion.ComparePrecedence(version, highestVersion) > 0)
                        {
                            highestVersion = version;
                            highestTfm = tfm;
                        }
                    }

tests/Aspire.Cli.Tests/Utils/AppHostHelperTests.cs:1

  • The removed CheckAppHostCompatibility_VersionCheck theory previously validated the compatibility threshold behavior across a range of Aspire version strings (including prerelease). With the switch back to the Semver NuGet package, keeping an equivalent test is important to ensure the compatibility logic still behaves correctly and doesn’t regress on edge cases like prerelease vs stable.

Comment thread src/Aspire.Cli/DotNet/DotNetSdkInstaller.cs
Comment thread src/Aspire.Cli/DotNet/DotNetSdkInstaller.cs
Comment thread src/Aspire.Cli/DotNet/DotNetSdkInstaller.cs
Comment thread src/Aspire.Cli/Agents/Playwright/PlaywrightCliInstaller.cs
@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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16156

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16156"

@eerhardt
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16156...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 14, 2026 15:51 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 14, 2026 15:51 Failure
@github-actions github-actions Bot had a problem deploying to deployment-testing April 14, 2026 15:51 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 14, 2026 15:51 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions github-actions Bot had a problem deploying to deployment-testing April 14, 2026 15:51 Failure
@github-actions github-actions Bot temporarily deployed to deployment-testing April 14, 2026 15:51 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 25 passed, 5 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-PythonFastApiDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcrPurgeTaskDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AppServicePythonDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests ❌ Failed ▶️ View Recording

@eerhardt
Copy link
Copy Markdown
Member Author

The TypeScript deployment tests passed:

image

3 of 5 failing will be fixed with #16125

@eerhardt eerhardt enabled auto-merge (squash) April 14, 2026 17:05
@eerhardt eerhardt merged commit 526711d into microsoft:main Apr 14, 2026
587 of 595 checks passed
@eerhardt eerhardt deleted the UseSemVerAgain branch April 14, 2026 18:26
@joperezr joperezr added this to the 13.3 milestone Apr 14, 2026
radical pushed a commit that referenced this pull request Apr 14, 2026
…ntation (#16033)" (#16156)

* Revert "Replace Semver NuGet package with internal SmolSemVer implementation (#16033)"

This reverts commit a4dad19.

* Fix up new code for SemVer
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants