An identifier was found which does not meet the requirements for valid identifiers. FIDL identifiers may contain alphanumerics and underscores (specifically A-Z
, a-z
, 0-9
, and _
), and additionally each identifier must begin with a letter and end with either a letter or number.
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0010-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
To fix this, change the identifier to make sure it contains only valid characters, starts with a letter, and ends with a letter or number.
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0010-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
This error may also occur if a multi-part (dotted) identifier is passed to an attribute.
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0010-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
To fix this, change to use only single-part identifiers in attributes.
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0010-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Note: This error generally only occurs when an identifier contains all valid characters, just in an invalid order, such as if an otherwise valid identifier starts with a number or underscore, ends with an underscore, or if the argument name for an attribute is a multi-part identifier. If characters which are not valid in an identifier are used, it will result in some other error, such as fi-0001: Invalid Character.