Releases: cockroachdb/errors
v1.11.3
v1.11.2
What's Changed
- Fix typos in comments and field names by @alexandear in #128
- IsAny() multi error support by @nikitacrit in #140
- Bump google.golang.org/grpc from 1.53.0 to 1.56.3 by @dependabot in #133
- Bump golang.org/x/net from 0.9.0 to 0.23.0 by @dependabot in #141
- Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 by @dependabot in #142
- chore: pkg import only once by @testwill in #132
New Contributors
- @nikitacrit made their first contribution in #140
- @dependabot made their first contribution in #133
- @testwill made their first contribution in #132
Full Changelog: v1.11.1...v1.11.2
v1.11.1
No functionality or API changes in this version. We downgrade the go version requirement in go.mod
to 1.19 since only tests actually use go 1.20 APIs.
This makes the 1.11.1 version suitable for deploying with projects that are not yet on go 1.20 but require forward compatibility with multi-cause errors encoded by version 1.11.0 or greater of this library. (We had previously released 1.10.1 for this purpose, but that wasn't necessary in retrospect.)
What's Changed
- ci: update actions; remove unneded check for go version by @alexandear in #124
- Fix typos in comments by @alexandear in #125
- Replace deprecated io/ioutil package with os by @alexandear in #126
- Downgrade go version requirement to 1.19 by @dhartunian in #127
New Contributors
- @alexandear made their first contribution in #124
Full Changelog: v1.11.0...v1.11.1
v1.11.0 go 1.20 compatibility and multi-cause error support
This release adds support for go 1.20 and its multi-cause errors introduced into the errors API.
Multi-cause errors are now supported
These were introduced in go 1.20
- Errors with multiple causes are encoded/decoded over the network along with their error causal tree
- Errors with multiple causes are formatted appropriately when printed verbosely
- Errors with multiple causes are formatted appropriately in Sentry reports
Is
andAs
support is now compatible with multi-cause errors (matching stdlib changes)
The public API gains a number of new functions
See the README for details.
Join
adds a drop-in replacement for the new stdlib function to combine an arbitrary number of errors into one (Thank you @StevenACoffman)- Ability to register multi-cause encoders/decoders for custom error types
- Ability to register encoders for custom error types that override the error messages of their causal chain (previously, this behavior was inferred in the decoder and could result in unintended formatting behavior)
A bug was fixed in the formatting of wrapped errors that resulted in only the innermost cause getting printed (#113)
What's Changed
- Document intended differences between WithHint and WithDetail (#114) by @omarkohl in #116
- support wrapError encode and decode by @dhartunian in #113
- support multi-cause errors in go 1.20 by @dhartunian in #112
- add formatting for multi-cause errors by @dhartunian in #115
- Add Go 1.20 errors.Join support by @StevenACoffman in #118
- Add multi-cause unwrap into Sentry reporting by @dhartunian in #119
- update README with new public API changes by @dhartunian in #120
- Upgrade to go 1.20 and add multi-cause error support by @dhartunian in #121
New Contributors
Full Changelog: v1.10.0...v1.11.0
v1.10.1 multi-cause error support without requiring go 1.20
This release is identical to v1.11.0 except that it remains compatible with pre 1.20 go versions. This allows for rolling out support in your system in a backwards compatible manner, allowing applications that are not using go 1.20 to decode and interpret multi-cause errors generated by newer versions of this library.
This release adds support for go 1.20 and its multi-cause errors introduced into the errors API.
Multi-cause errors are now supported
These were introduced in go 1.20
- Errors with multiple causes are encoded/decoded over the network along with their error causal tree
- Errors with multiple causes are formatted appropriately when printed verbosely
- Errors with multiple causes are formatted appropriately in Sentry reports
Is
andAs
support is now compatible with multi-cause errors (matching stdlib changes)
The public API gains a number of new functions
See the README for details.
Join
adds a drop-in replacement for the new stdlib function to combine an arbitrary number of errors into one (Thank you @StevenACoffman)- Ability to register multi-cause encoders/decoders for custom error types
- Ability to register encoders for custom error types that override the error messages of their causal chain (previously, this behavior was inferred in the decoder and could result in unintended formatting behavior)
A bug was fixed in the formatting of wrapped errors that resulted in only the innermost cause getting printed (#113)
What's Changed
- Document intended differences between WithHint and WithDetail (#114) by @omarkohl in #116
- support wrapError encode and decode by @dhartunian in #113
- support multi-cause errors in go 1.20 by @dhartunian in #112
- add formatting for multi-cause errors by @dhartunian in #115
- Add Go 1.20 errors.Join support by @StevenACoffman in #118
- Add multi-cause unwrap into Sentry reporting by @dhartunian in #119
- update README with new public API changes by @dhartunian in #120
- Upgrade to go 1.20 and add multi-cause error support by @dhartunian in #121
New Contributors
Full Changelog: v1.10.0...v1.11.0
v1.10.0 Dependency updates, gRPC API and redaction improvements
Add status.Errorf to the gRPC Wrappers #110
This change updates our gRPC API to match the grpc-go
status package more closely.
Update the redact dependency. #111
This release upgrade the cockroachdb/redact dependency in this project.
The upgrade leads to improved empty string handling in redacted error outputs. Details can be seen in the data driven test changes.
Bug fix and fewer dependencies
This releases fixes a small bug in errors.Is
and greatly simplifies the set of indirect dependencies via go.mod
.
This is useful because some of the older (now-unused) dependencies were reported as "vulnerable" by some security checking tools.
Better Sentry reports
This release enhances the composition of Sentry reports to reveal more details about errors. In particular, it does a better job of revealing information that was always redacted as unsafe in previous versions.
Some examples of data that is now included, that wasn't previously:
- the underlying errors behind barriers and assertion failures
- some Go runtime errors (e.g. context canceled, os.PathError, etc)
- custom error types that have a safe formatter function even though they don't report safe strings via the SafeDetails interface
- the tree structure of secondary errors
See PR #94 for details and an example.
Bug fixes and dependency update
context.DeadlineExceeded
is now preserved across the network, including keeping its reference so it can be compared by reference (#89).- a bug was fixed whereby a call cycle (and stack overflow) would happen when calling
errors.Is
on an error that delegates itsError
method toFormat
orSafeFormatError
(#90). - the errors library does not any more depend on a custom fork of sentry-go, and now uses the upstream library directly (#92). Special thanks to @jhchabran for this contribution.
Resolve go.sum checksum mismatches
Version v1.8.5 had been originally tagged for commit hash that was subsequently removed, and replaced by another commit hash.
Even though the window of time between the two release events was less than 10 minutes, it was enough to get the go mod proxy confused, resulting in errors about mismatched checksums.
This release fixes it. There are otherwise no changes from v1.8.5.