tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

deprecating.md (3302B)



layout: page title: Deprecating components and code permalink: /contributing/deprecating


The Android Components team follows a rapid release process with major releases coming out frequently. Therefore API breakage can happen more often when switching to a new version. The Android Components team tries to reduce API breakage and uses the following deprecation process to give app teams notice of upcoming changes as early as possible. Deprecated APIs are removed not earlier than 2 releases after the release that introduced the deprecation warning.

Avoiding API breakage

Before breaking or deprecating an API consider options to provide new functionality without breaking the (old) API.

Examples:

In general if possible we try to keep "compile compatibility" when an app project upgrades to a new Android Components version.

When to Deprecate

Deprecating a public API is needed whenever we introduce a new API and at the same time keep the old API around so that app teams have time to migrate. The goal of deprecating an API should always be to eventually remove it.

No API guarantees are made for snapshot releases and so far unreleased/unused components. Unreleased APIs can break/change before they are released or used.

How to Deprecate

`Kotlin @Deprecated("Use loadAsync instead", ReplaceWith("loadAsync(context)")) suspend fun load(context: Context): Deferred<SearchEngineList> { // ... } `