Skip to content
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

Update bufcas and slicesextended #2572

Merged
merged 2 commits into from
Nov 12, 2023
Merged

Update bufcas and slicesextended #2572

merged 2 commits into from
Nov 12, 2023

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented Nov 12, 2023

This PR does a few things:

  • Adds Reduce and Count functions to slicesextended.
  • Introduces ParseError to bufcas. An error of type *bufcas.ParseError is returned from bufcas.Parse.* functions on unsuccessful parsing. This will allow us to understand the nature of an error returned from the new ModuleKey.Digest(), and handle situations such as Ignore b1/b3 buf.lock digests only #2111. Instead of blanking out the error from a buf.lock file, we can instead return an error saying we did not understand the DigestType, and handle that accordingly in places where we don't support it.
  • Adds some extra functions to bufcas with respect to conversion to/from repeated Protobuf types.
  • Updates dependencies as well.

@bufdev bufdev requested a review from doriable November 12, 2023 18:41
@bufdev bufdev merged commit f25ee67 into main Nov 12, 2023
8 checks passed
@bufdev bufdev deleted the pkg-bufpkg-updates branch November 12, 2023 18:52
@@ -66,10 +67,16 @@ func (d DigestType) String() string {
// ParseDigestType parses a DigestType from its string representation.
//
// This reverses DigestType.String().
//
// Returns an error of type *ParseError if thie string could not be parsed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo thie -> this|the

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants