-
Notifications
You must be signed in to change notification settings - Fork 38
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
pkg,schema,internal: eliminate multierror. #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to bump our go version to at least 1.19.
d6bfc31
to
72d9aa7
Compare
Yeah, I figured too. |
Are our clients using go >= 1.21 to build their applications? For completeness, I recently did something similar in one of our projects to enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of errors.Join
can clean this up even further since it's never required to store a slice of errors.
1d38004
to
7a20465
Compare
If you don't care about how the topology of the final set of stored errors look like, but (for some reason) I prefer to keep errors 'at the same level' in the same slice (of joinErrors) and only 'cascading result of errors' (errors caused by other errors) nested the way it would be if we used the code you suggested. See my other related comment... |
Migrate from our internal multierror implementation to using error slices and stock errors.Join(). Signed-off-by: Krisztian Litkey <[email protected]>
7a20465
to
62477a6
Compare
OK. That's a fair point. I was not considering this aspect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm good with the changes now. Thanks for motivating your choices so clearly.
My final concern is the go version bump. Do we foresee issues with clients consuming this module?
62477a6
to
788ec0e
Compare
Bump go version to 1.20. That'll get us stock errors.Join() support and remove reliance on an EOL'd 1.19 go version. Signed-off-by: Krisztian Litkey <[email protected]>
788ec0e
to
7ce7168
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @klihub. I think I'm fine with the 1.20 bump here.
Once Podman bumps their version we could look at doing that here too.
Migrate from our internal multierror implementation to using error slices and stock errors.Join().