microsoft / microsoft/typespec

Cross‑Language Support for Post‑Emit Execution in TypeSpec SDK Generation

Open
#10,238 4 comments 0 reactions 0 assignees View on GitHub
emitter:client:all epic
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

## Background

As part of ongoing efforts to automate TypeSpec to SDK, service teams (Foundry SDK) identified a gap in the current SDK generation workflow: there is no standardized way to run post‑generation logic after SDK code is emitted.

This is discussed in Foundry Spec ↔ SDK auto‑sync discussion, where people raised scenarios requiring post‑emit fixes or adjustments (temporary SDK workarounds, transitional fixes, or one‑time corrections) that cannot cleanly live inside the emitter logic today. Service teams also expressed the need for flexibility for customization. We proposed the approach of post‑emit execution step, ideally supported directly by emitters, with temporary pipeline‑level solutions as a short‑term fallback.

Similar issue was also discussed https://github.com/Azure/azure-sdk-tools/issues/10366 where multiple design decision were discussed:

- tsp-client should not become a generic post‑processing runner.
- Post‑generation logic should be owned by emitters, not centrally orchestrated.

This epic tracks the work required to achieve language parity by introducing or aligning post‑emit execution support in each language emitter, which is triggered by real scenarios raised in Foundry requirements.

We have this effort for GO today to handle some special request for KeyVault: https://github.com/Azure/autorest.go/pull/1636

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.