azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Create custom attribute for obsolete cmdlets, parameters, and properties

Open theMichaelB opened this issue 9 years ago • 7 comments

when running a script with a a large number of cmdlets in (as I imagine is generally the case) there can be a couple of instances of

WARNING: The output object type of this cmdlet will be modified in a future release.

there then needs to be a piece of investigation work before any upgrades can be done to the Azure PS version because you don't know which cmdlet will be modified.

Can the warning be modified to include the name of the cmdlet that it is coming from?

theMichaelB avatar Jan 26 '17 07:01 theMichaelB

@twitchax @markcowl do you guys see any issues with this ask?

cormacpayne avatar Mar 03 '17 22:03 cormacpayne

Seems reasonable to me. :)

twitchax avatar Mar 03 '17 23:03 twitchax

  • Need to update the breaking change document to include this new standard.
  • Define a new attribute for obsolete properties that has a message with ample amount of information that reflects the breaking change that will be made in the future
  • Replace existing obsolete attributes with this new attribute

cormacpayne avatar Mar 10 '17 19:03 cormacpayne

Will make this so post-build, since this will be the next opportunity for obsoleting parts of the API

markcowl avatar Apr 20 '17 20:04 markcowl

Create a custom obsolete attribute that will handle the removal/deprecation of the following:

  • Cmdlet
    • [ ] Whenever the cmdlet is called, a warning will be printed to the console that calls out the cmdlet name
  • Parameter
    • [ ] Whenever the parameter is used in a command, a warning will be printed to the console that calls out the parameter name and the cmdlet it is being used with
  • Property
    • [ ] Whenever a cmdlet with an output type containing the property is called, a warning will be printed to the console that calls out the property name, the type it is found in, and the cmdlet that the type is being returned from

Also need to add the following:

  • [ ] Common code that allows the appropriate warning to be printed to the console
  • [ ] Tools in place for parsing the custom obsolete attributes and creating the migration guide from the contents
  • [ ] Standard mechanism for turning off deprecation warnings

cormacpayne avatar Aug 28 '17 19:08 cormacpayne

Also need

  • Standard mechanism for turning off obsolete warnings

markcowl avatar Dec 11 '17 18:12 markcowl

Fixed

markcowl avatar May 08 '18 23:05 markcowl