Fix forward reference resolution of service shapes #543
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Service shapes weren't correctly using forward reference resolution in
the IDL for operation bindings and resource bindings. This is because we
were eagerly taking the value out of a StringNode that uses a syntactic
shape ID before all of the shapes are resolved. This causes the
StringNode to assume that the shape ID is in the same namespace that it
was defined in, which can be incorrect when there are
use
statementsin effect. To address this, I've updated the optionalId and
optionalIdList methods used in the IDL loader to always use a dedicated
forward reference resolution callback independent of the callback used
in other places (like trait values). Now things like identifiers,
inputs, outputs, operation, and resource bindings are all handled in a
uniform way.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.