Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix forward reference resolution of service shapes #543

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

mtdowling
Copy link
Member

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 statements
in 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.

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` statements
in 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.
@mtdowling mtdowling requested a review from kstich August 26, 2020 00:56
@mtdowling mtdowling merged commit f1190e7 into master Aug 26, 2020
@mtdowling mtdowling deleted the fix-forward-references branch September 14, 2020 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants