Software Engineering at Google Chapter #15 - Deprecation (3 of 3)

  • Deprecation Warnings:
    • Does not often lead to users migrating to the new system, but instead helps stop new uses of the deprecated item>
    • Software developers can get "alert fatigue" and start to ignore deprecation warnings if they pile up
    • Deprecation warnings need to be both relavant and actionable
    • To be actionable a warning needs to tell the user specific actions to take in order to move away from the deprecated system
    • Check for depreactions pre-source code checkin
    • You can use tools such as and clang-tidy to provide additional information and context to errors and warnings
    • Warnings for deprecated dependencies are only surfaced when they are compuslory and a team is actively working on deprecating the dependency. This is so engineers are not overwhelmed with warnings - only "active" changes are noted
  • Google has learned that deprecation projects are not a success without a process owner
  • Without a human to push through the deprecation process the old system will and the warnings will never go away
  • All orgs have software and systems without owners and those projects will need to be deprecated at some point
  • Create dedicated teams to deprecate these types of systems, don't make it a side-goal of other teams or it may never get done
  • Centralizing efforts helps to reduce costs by making them more transparent
  • Create milestones such as ones for sub-components
  • During the discovery process you determine how and by whom a system is being used
  • Google uses Code Search to determine who uses a given library and how they use it
  • Logging and runtime sampling of the use of libraries also helps determine who is using it and what for
  • Use your testing suite to determine if all references to the deprecated object have been removed / updated
  • Google use static anlysis and complier annotations to let people know if they are using calls that are deprecated
  • Google uses whitelists in their build system to ensure that new dependencies are not introduced to a depcreated system
  • Deprecation ecompasses both the social and technical aspects



Thank you for your time and attention.
Apply what you've learned here.
Enjoy it all.