-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add breaking change policy to website #6049
base: main
Are you sure you want to change the base?
Changes from 4 commits
66b21fc
4ed2829
a7143d6
2b1cda7
5776fd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,56 @@ | ||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||
title: Breaking Change Policy | ||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
# Breaking Change Policy | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
import { Badge } from "@astrojs/starlight/components"; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
:::note | ||||||||||||||||||||||||||
This is to be applicable after 1.0.0 release | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
::: | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Versioning Scheme | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
TypeSpec Compiler and libraries follow [semver](https://semver.org/) for versioning. Which means a breaking change(according the following policy) will only be introduced in a major version release. | ||||||||||||||||||||||||||
timotheeguerin marked this conversation as resolved.
Show resolved
Hide resolved
timotheeguerin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Breaking Change Philosophy | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The basic of the policy can be summarized as follows: existing language syntax and semantics will not change without a major version. The runtime behavior for a given TypeSpec will not change without a major version. TypeSpecs leveraging new or updated features may cause runtime API consumers to fail (e.g. because a new type is unhandled) or builds to fail (e.g. because exhaustive unions are no longer exhaustive). | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
`` | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- The language syntax and semantics for existing language elements will not change within a major version. | ||||||||||||||||||||||||||
- A spec that was building successfully should build successfully with the new version of the compiler and libraries with the same major version. | ||||||||||||||||||||||||||
timotheeguerin marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
- New types and functionalities can be added in a minor version release. | ||||||||||||||||||||||||||
- If a spec updates to use that new functionality/type it is not considered a breaking change if it goes through a library/emitter that will now break. | ||||||||||||||||||||||||||
- TypeScript types might change in ways that introduce compilation type checking errors. Those are not considered breaking changes. | ||||||||||||||||||||||||||
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### Bugs | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
A bug fix that requires breaking will not be considered a breaking change if the behavior was already broken to start with. | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## Categories of Breaking Changes | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- <Badge text="Level 0" variant="danger" />: Those Apis shouldn't be broken unless we make a major | ||||||||||||||||||||||||||
version and a lot of consideration should given in making any of those. This should be apis that | ||||||||||||||||||||||||||
are recommended to be used by library author. | ||||||||||||||||||||||||||
- <Badge text="Level 1" variant="note" />: Those describe change that are not semantically relevant | ||||||||||||||||||||||||||
but still produce noticeable changes in the output. This could be for example a change in the way | ||||||||||||||||||||||||||
the output is formatted. | ||||||||||||||||||||||||||
- <Badge text="Level 2" variant="tip" />: Those are internal apis that could be accessed but | ||||||||||||||||||||||||||
touching it would be at the library author risk and breaking change wouldn't even need to be | ||||||||||||||||||||||||||
documented | ||||||||||||||||||||||||||
Comment on lines
+34
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| Example | Level | Description | | ||||||||||||||||||||||||||
| -------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||||||||||||||||||||||
| TypeKit | <Badge text="0" variant="danger" /> | TypeKits are the recommend way to expose apis for a library. Those should be extremely stable. | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
| Additional helpers for a library | <Badge text="0" variant="danger" /> | Depending on the helper this could be considered critical or more advanced usage | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
| TypeSpec Syntax Tree | <Badge text="2" variant="tip" /> | The TypeSpec AST is internal and may change at any time. | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
| Checker | <Badge text="2" variant="tip" /> | Checker is an internal of the typespec program | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
| Symbols | <Badge text="2" variant="tip" /> | Internals | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
| Formatter | <Badge text="1" variant="note" /> | Formatting shouldn't affect the meaning of the language. Changes to the formatting should be taken with consideration as it could create a lot of diff but it shouldn't also be considered a breaking change | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
| Bug | [See bug](#bugs) | I think if something is found to be a bug from the documented behavior and fixing it is in someway breaking it shouldn't be considered as such unless it is such a widely used item where it has to become a "feature". Those should however still be documented as breaking in the release notes | | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
### Supported node version | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
TypeSpec intends to support all [current node.js releases](https://nodejs.org/en/about/previous-releases). We may drop support for a maintenance or unsupported node version within a major version. | ||||||||||||||||||||||||||
Comment on lines
+54
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the stdout of the compiler is not a contract, use teh api for programmatic usage