Description
aspire new shows Python as a selectable language for the generic Empty AppHost template even when the Python polyglot feature flag is not enabled. Selecting Python then fails with:
Unknown language: 'python'
Repro steps
- Run
aspire new with Python polyglot support disabled / default feature flags.
- Select
Empty AppHost.
- In the language picker, select
Python.
Expected behavior
The language picker should only show enabled/available AppHost languages. If experimentalPolyglot:python is disabled, Python should not appear.
Actual behavior
Python appears in the language picker, but selecting it fails with Unknown language: 'python'.
Notes
DefaultLanguageDiscovery correctly gates Python behind KnownFeatures.ExperimentalPolyglotPython, and GetLanguageById("python") returns null when the feature flag is disabled. However, the aspire-empty callback template currently declares a hardcoded selectable language list that includes Python, and NewCommand.PromptForAppHostLanguageAsync displays that list directly instead of filtering it through language discovery / feature availability.
Likely affected area:
src/Aspire.Cli/Templating/CliTemplateFactory.cs
src/Aspire.Cli/Commands/NewCommand.cs
Description
aspire newshows Python as a selectable language for the generic Empty AppHost template even when the Python polyglot feature flag is not enabled. Selecting Python then fails with:Repro steps
aspire newwith Python polyglot support disabled / default feature flags.Empty AppHost.Python.Expected behavior
The language picker should only show enabled/available AppHost languages. If
experimentalPolyglot:pythonis disabled, Python should not appear.Actual behavior
Python appears in the language picker, but selecting it fails with
Unknown language: 'python'.Notes
DefaultLanguageDiscoverycorrectly gates Python behindKnownFeatures.ExperimentalPolyglotPython, andGetLanguageById("python")returnsnullwhen the feature flag is disabled. However, theaspire-emptycallback template currently declares a hardcoded selectable language list that includes Python, andNewCommand.PromptForAppHostLanguageAsyncdisplays that list directly instead of filtering it through language discovery / feature availability.Likely affected area:
src/Aspire.Cli/Templating/CliTemplateFactory.cssrc/Aspire.Cli/Commands/NewCommand.cs