Skip to content

Conversation

ehsandeep
Copy link
Member

@ehsandeep ehsandeep commented Aug 2, 2025

Context

the earlier implementation used DEBUG env variable to add stacktrace to every error, and it was colliding with other implementations, and in general the errorutil package is deprecated and is not meant to be used because of various design choices that were made earlier that were turned out to be not a good standard practice

now we have errkit which is improved version of this but is a breaking one and the dependency path is diferent and so are the methods and etc, the pr

  • fixes the strack trace addition issue
  • makes errorutil a no-op package which internally always calls errkit
  • marked erroutil as deprecated which will call all lint jobs to flags this everywhere downstream, but note the functionality will not be affected and this is more of a warning to migrate to newer version
  • for more info about new errkit see errkit/README.md in this repository

tarunKoyalwar and others added 5 commits August 2, 2025 15:07
- Remove unused 'os' import
- Remove unused 'errorutil' import
Fixes lint errors from golangci-lint
- Replace all deprecated errorutil imports with errkit
- Migrate error creation patterns:
  * errorutil.New().WithTag() → errkit.New()
  * errorutil.NewWithTag() → errkit.Newf()
  * errorutil.NewWithErr().Msgf() → errkit.Wrapf()
  * errorutil.WrapfWithNil() → errkit.Wrap() with nil check
  * errorutil.IsTimeout() → errors.Is(err, context.DeadlineExceeded)
- Updated packages: channelutil, proxy, file, maps, reader, update, url
- All tests passing, golangci-lint clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ehsandeep ehsandeep requested a review from dwisiswant0 August 14, 2025 20:01
@Mzack9999 Mzack9999 self-requested a review August 15, 2025 14:36
@Mzack9999 Mzack9999 linked an issue Aug 15, 2025 that may be closed by this pull request
@Mzack9999 Mzack9999 merged commit 1f58e50 into main Aug 15, 2025
8 of 11 checks passed
@Mzack9999 Mzack9999 deleted the fix-err-trace branch August 15, 2025 14:39
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.

remove stacktrace completely from errorutil
3 participants