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 bug allowing validation to be skipped #440

Merged
merged 2 commits into from
May 18, 2020

Conversation

JordonPhillips
Copy link
Contributor

Description of changes:

This fixes a bug where any SourceExceptions rasied after the model assembler began validation would result in validation getting skipped. This was due to the fact that the assembler calls onEnd in its visitor before validation AND whenever it catches that class of exception. onEnd will cache its result, so you can't simply call onError and guarantee it will be in the output.

This also updates a few tests that were accidentally doing this, as well as the documentation for the suppress trait which incorrectly called it suppression.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This fixes a bug where any `SourceException`s rasied after the model
assembler began validation would result in validation getting
skipped. This was due to the fact that the assembler calls `onEnd`
in its visitor before validation AND whenever it catches that
class of exception. `onEnd` will cache its result, so you can't simply
call `onError` and guarantee it will be in the output.
@JordonPhillips JordonPhillips added the bug This issue is a bug. label May 15, 2020
@JordonPhillips JordonPhillips merged commit a0b6ed2 into smithy-lang:master May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants