microsoft / typespec

https://typespec.io/
MIT License
4.12k stars 197 forks source link

Versioning for 3p libraries #3482

Open m-nash opened 3 months ago

m-nash commented 3 months ago

Clear and concise description of the problem

It would be nice to have the ability to indicate which versions were "preview" versions and which versions were "stable" versions in the api version enum in tsp. Today Azure uses a specific convention for versioning of date or date-preview so its easy to parse this and determine which versions fall into which category. Given how diverse versioning schemes can be across organizations it would be good to have the author of the spec indicate this directly into the spec. This would give any consumer the ability to filter out versions they may not want.

We also need a way for customers to be able to specify whether they want to include or exclude preview versions. TCGC today has a helper method, but the question is how / when do you decide to call it? It feels like customers need a compiler flag to indicate this so it can be passed down through the emitter then to tcgc to produce the desired outcome.

Checklist

markcowl commented 3 months ago
allenjzhang commented 1 month ago

The minimal to do is to allow compile a specific version. With that, user can have full control and specify whichever version needed via CLI.