Skip to content

aspire new Empty AppHost shows disabled Python language option #16661

@maddymontaquila

Description

@maddymontaquila

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

  1. Run aspire new with Python polyglot support disabled / default feature flags.
  2. Select Empty AppHost.
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions