Skip to content

Fix bug allowing validation to be skipped#440

Merged
JordonPhillips merged 2 commits intosmithy-lang:masterfrom
JordonPhillips:no-skip-validation
May 18, 2020
Merged

Fix bug allowing validation to be skipped#440
JordonPhillips merged 2 commits intosmithy-lang:masterfrom
JordonPhillips:no-skip-validation

Conversation

@JordonPhillips
Copy link
Copy Markdown
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