Dependencies cannot be imported multiple times:
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0042-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0042-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Ensure that each dependency is only imported once:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0042-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0042-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
It is worth noting that FIDL does not support importing different versions of the same library. The @available
version is resolved for the entire fidlc
compilation via the --available
flag, meaning that both the library being compiled and all of its dependencies must share the same version for any given compilation run.