chore: replace golang.org/x/xerrors for stdlib errors#763
Merged
zeroshade merged 2 commits intoapache:mainfrom Apr 13, 2026
Merged
chore: replace golang.org/x/xerrors for stdlib errors#763zeroshade merged 2 commits intoapache:mainfrom
zeroshade merged 2 commits intoapache:mainfrom
Conversation
zeroshade
approved these changes
Apr 13, 2026
Member
|
Can you run |
Contributor
Author
|
Doh! I saw some of those errors having punctuation, but thought I'd leave them as they were already there and to keep scope minimal, but forgot that linters tend to ignore them for I'll have a look at fixing the linting issues. |
The golang.org/x/xerrors module is a transitional module for what became go1.13 errors. Most of its functionality is now available in stdlib errors, with the exception of stdlib not providing a stack-trace (and some utility functions related to that). Looking at history to see if that functionality was essential for using this package, I found that the golang.org/x/errors module was introduced in [apache/arrow@7126fdb], to address [ARROW-7357]. > we should migrate away from `pkg/errors` to `golang.org/x/xerrors` to > ensure better error handling (and one that is Go-1.13 compatible). Based on the above, it looks like the intent was to provide compatibility with go1.13+ errors, which are now mainline, so stdlib errors should be preferred for this. [ARROW-7357]: https://issues.apache.org/jira/browse/ARROW-7357 [apache/arrow@7126fdb]: apache/arrow@7126fdb Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
4f63907 to
8263f97
Compare
Contributor
Author
|
I think it should be good now 👍 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
relates to:
The golang.org/x/xerrors module is a transitional module for what became go1.13 errors. Most of its functionality is now available in stdlib errors, with the exception of stdlib not providing a stack-trace (and some utility functions related to that).
Looking at history to see if that functionality was essential for using this package, I found that the golang.org/x/errors module was introduced in apache/arrow@7126fdb, to address ARROW-7357.
Based on the above, it looks like the intent was to provide compatibility with go1.13+ errors, which are now mainline, so stdlib errors should be preferred for this.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?