docs(versioning): fix stable-after-preview guidance for @previewVersion ordering#4498
docs(versioning): fix stable-after-preview guidance for @previewVersion ordering#4498Copilot wants to merge 3 commits into
Conversation
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
@previewVersion ordering
markcowl
left a comment
There was a problem hiding this comment.
Pull the latest from main, make these changes, ensure that all changed files are correctly formatted, this branch is up to date with the main branch and only the changes associated with this pr are in the pr diff.
| ## Making Changes to your TypeSpec spec | ||
|
|
||
| - Add a new entry to the versions enum for the new stable version | ||
| - Replace the latest preview entry in the versions enum with the new stable version, and remove `@previewVersion` in the same edit to avoid diagnostics |
There was a problem hiding this comment.
Here you should instruct the user to remove the @previewVersion decorator from the preview version and add the new stable version as the last entry in the enum.
If you remove the preview version, the spec will fail to compile, which will make editing difficult.
There was a problem hiding this comment.
Updated in the latest commit. The first step now instructs users to remove @previewVersion and add the new stable version as the last enum entry, keeping the preview version in place so compilation still works.
|
|
||
| ```diff lang=tsp | ||
| enum Versions { | ||
| - @Azure.Core.previewVersion |
There was a problem hiding this comment.
Here, we should only instruct the user to remove the replaced preview version (since we will have removed the @previewVersion decorator above)
There was a problem hiding this comment.
Added a step here that instructs the user to remove only the replaced preview version from the enum (since @previewVersion was already removed in the first step).
…ator first Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Done. Pulled latest from main, made the requested changes, verified formatting is correct, and confirmed only the relevant doc file is in the diff. |
@previewVersion ordering
The stable-after-preview how-to instructed authors to add a new stable version and remove
@previewVersionlater as a separate step. This produces a diagnostic because@previewVersionmust only decorate the last version in the enum—adding a stable version after it violates that constraint.Changes
@previewVersionfrom the preview version and add the new stable version as the last enum entry (keeping the preview version so the spec still compiles during editing)Corrected flow