The @available
argument renamed
is not allowed on its own. It must be used together with the replaced
or removed
argument:
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0212.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
If you just want to rename the element at version N
, use replaced=N
and define a replacement with the new name marked added=N
:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0212-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
In this case, the replacement method must override @selector
for ABI compatibility.
Alternatively, if you want to remove the element at version N
and refer to it by a different name after its removal, use removed=N
:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0212-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
In this case, the new name will only be used when targeting multiple versions (e.g. --available test:1,2
) since that is the only way to include the element while also targeting a version past its removal.
See FIDL versioning to learn more about versioning.