Powershell: Is changing the name of a parameter set considered breaking?

Created on 3 Jul 2019  路  3Comments  路  Source: PowerShell/PowerShell

Are parameter set names considered contractual, and therefore changing a parameter set name is considered breaking, or can they be changed as required (i.e. when moving parameters into a new base class as part of a refactoring effort performed while fixing some issues in a set of commands that share those parameters)?

The breaking change documentation does not mention parameter sets at all, and therefore I would think parameter set names are not contractual, but thought I should check first to make sure.

cc: @SteveL-MSFT

Committee-Reviewed Issue-Question Resolution-Fixed

Most helpful comment

@PowerShell/powershell-committee reviewed this. We reaffirm that ParameterSet names are not a public api and changing them is not a breaking change. We should update the breaking change contract doc to make this apparent and explicit.

All 3 comments

@KirkMunro Thanks for bringing this up. We decided way back in V1 that changing the name of a parameter set would officially not be considered a breaking change. But of course it's a publicly visible property so i'm sure people have taken dependencies on them. At this point, the Committee should probably review this decision/guidance and update it if necessary.

I would not want it to be a breaking change because we have already discussed that parameter binding should be enhanced to support more features (like PSMore idea and more flexible parameter set description notation).
It also seems that the addition of any new parameter may cause a redefinition of parameter sets in any cmdlet.

@PowerShell/powershell-committee reviewed this. We reaffirm that ParameterSet names are not a public api and changing them is not a breaking change. We should update the breaking change contract doc to make this apparent and explicit.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaximoTrinidad picture MaximoTrinidad  路  3Comments

alx9r picture alx9r  路  3Comments

garegin16 picture garegin16  路  3Comments

manofspirit picture manofspirit  路  3Comments

andschwa picture andschwa  路  3Comments