-
Notifications
You must be signed in to change notification settings - Fork 136
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
[overlay] improve overlay mismatch error message by specifying left/right side context #95
Comments
(more sketching...) Given:
... yields ...
|
Made some progress on this, this weekend. Thinking we could get significant value with mere newlines, without indentation:
---
clients:
- client1:
secret: blah1
- client2:
secret: blah2
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.all
---
clients:
#@overlay/match by=overlay.all,expects="1+"
- client1:
secret: foo yields:
... and also surfacing the fact that *-items from overlays are being applied to the entire corresponding collection on the left (a source of confusion for some). Thoughts? |
@ewrenn8 and I spent some time on this. We're really good at showing the "too many" matches cases because we build up that collection of matches and then check its desired length, it's the "less than expected" matches that we're struggling to represent. Especially once we get into the larger scenarios: with 100 items, expecting 10 of them to match on This is made harder because the code is building up error messages recursively, so outputting a location seems to require outputting the entire parent stack, like we do with the overlay in the current error message. Displaying the whole path to the node that didn't match may be more straightforward, but with multiple matches we may end up with some strange output. |
some error message improvements to indicate left vs right nodes
vs
vs
originated from #94
/cc @jtigger
The text was updated successfully, but these errors were encountered: