fi-0194: Method result union payload cannot be empty struct {:#fi-0194}

Note: This fix can be applied automatically using the fidl-fix tool. All instances of this error should come with a fidl-fix invocation pre-generated in their output.

FIDL is currently migrating away from allowing empty structs as method payloads. Previously, this was required for cases where the response of a two-way method call required using a compiler-generated result union. Specifically, this meant that any method defining an error or using flexible strictness was required to spell out empty response payloads:

{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0194-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-0194-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

The fix for this is to simply remove the superfluous struct {} instances:

{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0194-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-0194-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

This small syntax migration aims to make FIDL more consistent and readable. Previously, the struct {} was required in cases where FIDL generated a result union to ensure that the wire format implications of using such a union were always front and center for readers. However, the subtlety of whether or not spelling out struct {} was required proved more trouble than it was worth, so it is being removed from the language in favor of the new spelling.

Caution: Both unknown interactions and the simplified response struct syntax are experimental features. This error will only appear when both the unknown_interactions and simple_empty_response_syntax experimental flags are enabled.