docs/dev-process/breaking-change-contract.md
We have a serious commitment to backwards compatibility with all earlier versions of PowerShell – including the language, cmdlets, APIs and the various protocols (e.g. PowerShell Remoting Protocol) and data formats (e.g. cdxml).
Below is a summary of our approach to handing breaking changes including what kinds of things constitute breaking changes, how we categorize them, and how we decide what we're willing to take.
Note that these rules only apply to existing stable features that have shipped in a supported release. New features marked as “in preview” that are still under development may be modified from one preview release to the next. These are not considered breaking changes.
To help triage breaking changes, we classify them in to four buckets:
Any change that is a clear violation of the public contract.
This is an acceptable solution for PowerShell scripts but may break .NET code that depends on the name of the original member on the cmdlet object type.)
Change of behavior that customers would have reasonably depended on.
Examples:
Judiciously making changes in these type of features require judgement: how predictable, obvious, consistent was the behavior? In general, a significant external preview of the change would need to be done also possibly requiring an RFC to be created to allow for community input on the proposal.
Change of behavior that customers could have depended on, but probably wouldn't.
Examples:
correcting behavior in a subtle corner case that has no obvious utility.
Example: the existing behavior of the PowerShell cd called without arguments is to do nothing. Changing this behavior to be consistent with UNIX shells which typically set the CWD to the user’s home directory
Example: changes to formatting for an object type. We have always considered the output formatting of an object to be a user experience issue and thus open for change. Since PowerShell pipes objects not text, changes to the way an object is rendered to text is generally considered to be allowed.
As with type 2 changes, these require judgement: what is reasonable and what’s not?
Changes to surface area or behavior that is clearly internal or non-breaking in theory, but breaks an app.
Examples:
System.Management.Automation.Internal namespace (even if they are public, they are still considered internal and subject to change).It is impossible to evolve a code base without making such changes, so we don't require up-front approval for these, but we will sometimes have to go back and revisit such change if there's too much pain inflicted on the ecosystem through a popular app or library.
Request for clarifications or suggested alterations to this document should be done by opening issues against this document.