-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/adt: identify duplicate errors when pairwise-combining
Revert cue/errors/errors.go to before https://review.gerrithub.io/c/cue-lang/cue/+/1199401 The previous attempt to fix this issue was extremely fragile: it only worked if there was an attempt to append the exact same error contiguously. In practice we have seen that this may not happen, rendering that fix ineffective. So it is reverted here. By contrast, in core/adt *OpContext.node(), it can be the case that the call to unifyNode returns the opContext's own errors. The subsequent call to *OpContext.AddBottom() and CombineErrors() can therefore result in the duplication of the opContext's errors. Identifying and solving this in CombineErrors() seems to be a robust solution. Fixes #3307 Signed-off-by: Matthew Sackman <[email protected]> Change-Id: Ib3a0bff023343d410273017ea24e92d54346d77c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199723 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
- Loading branch information
1 parent
81d6f8b
commit 5a77ce1
Showing
4 changed files
with
98 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters