@available(removed=N)
{:#fi-0205}When an element is marked @available(removed=N)
, it means the element can no longer be used at version N
. You cannot reuse its name:
{% 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 you want to replace the element with a new definition (same API and ABI), use 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 you want to remove the element and define a new, unrelated element (different API and ABI), choose a different name for the new 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).*" %}
If you really want to reuse the name (same API, different ABI), use the renamed
argument to rename the old element post-removal, freeing up its original name:
{% 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-c.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Notice that in this case you must use @selector
to ensure the new method has a different ABI.
See FIDL versioning to learn more about versioning.