Rework field errors #479
Open
Rework field errors #479
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Working on #476 I ran into an issue where error propagation would not work anymore. Digging deeper into it I realized that the cause was the copying of the
executionContextbecause after the copy an append to theErrorsinside theexecutionContextwould not have any effect anymore.This PR is an attempt to fix this by removing
executionContext.Errorsand instead returning the errors.Since there is not a single list of errors any more but several small lists which are then concatenated I was expecting some decreased performance and increased allocations. Suprisingly though, running the benchmarks yields the opposite result:
Benchmarks results were produced by multiple runs of
go test -run=none -bench=. -benchmemand taking the best result. I was seeing some variability in the bench results (~2-3s in the total runtime) so maybe someone can verify those results.@Fontinalis @chris-ramon What do you think of this approach?