When an element is marked @available(removed=N)
, it indicates that the element can no longer be used at version N
. It should not merely be replaced by a new definition marked @available(added=N)
:
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0205.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
If the replacement is intentional, make it explicit by using the replaced
argument instead of the removed
argument:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0205-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
If the replacement is unintentional, remove or rename the other element:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0205-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
The removed
and replaced
arguments both have the same effect on the generated bindings, but they represent different points in API lifecycle. The removed
argument indicates the end of an API, while the replaced
argument indicates a transition to a new definition.
See FIDL versioning to learn more about versioning.