Sitelet https://github.com/Azure/azure-functions-core-tools/pull/5670
Skip to content

docs(templates): design func template constraints - #5670

Draft
Ahmed Muhsin (ahmedmuhsin) wants to merge 2 commits into
vnextfrom
docs-5643-template-constraints
Draft

Ahmed Muhsin (ahmedmuhsin) wants to merge 2 commits into
vnextfrom
docs-5643-template-constraints

Conversation

@ahmedmuhsin

Copy link
Copy Markdown

Resolves #5643.

Adds the template-engine-constraints design. The other templating designs leave workload and extension bundle checks to it. Docs only, and it builds on the reconciled designs in #5663.

  • Templates declare requirements in the standard TemplateEngine constraints section. Func adds func-workload, which checks the workloads the CLI loaded, and func-bundle, which checks the project's resolved extension bundle. Both take NuGet version ranges.
  • Only func template packages can use the func types. dotnet new blocks templates with constraint types it doesn't know, so packages shared with it can't use them.
  • The engine's os and host checks stay. The .NET SDK sdk-version and workload checks aren't registered, so templates that use them are blocked.
  • Results map to the four eligibility states in the integration design. Anything that isn't eligible is blocked, even with --force.
  • The CLI writes every next step itself, and the only template text it uses is a validated workload name.
  • Azure-Samples templates declare one workload constraint per stack. Choosing templates by target framework stays out of constraints.

The coordination inventory now lists the constraints design as complete, and the integration, quickstarts, and Samples designs point to it.

@ahmedmuhsin
Ahmed Muhsin (ahmedmuhsin) added this pull request to stack #5671 September 30, 2026 02:49
Base automatically changed from docs-5650-reconcile-templating-designs to vnext October 1, 2026 17:52
…e listed

func init now lists templates from the session it later invokes them from, so the early-evaluation question this design left to the func init work is settled.
@ahmedmuhsin
Ahmed Muhsin (ahmedmuhsin) force-pushed the docs-5643-template-constraints branch from 0167693 to ed64698 Compare October 1, 2026 17:52
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.

1 participant