Skip to content

Remove pingcap/errors dependency in favor of stdlib#6

Merged
kyleconroy merged 3 commits intomainfrom
claude/remove-pingcap-errors-MGFJl
Apr 26, 2026
Merged

Remove pingcap/errors dependency in favor of stdlib#6
kyleconroy merged 3 commits intomainfrom
claude/remove-pingcap-errors-MGFJl

Conversation

@kyleconroy
Copy link
Copy Markdown
Contributor

Replace github.com/pingcap/errors throughout the codebase with stdlib
errors and fmt:

  • errors.Trace/WithStack drop (no stack tracing)
  • errors.Annotate/Annotatef use fmt.Errorf with %w via local helpers
  • errors.Errorf -> fmt.Errorf, errors.New -> errors.New (stdlib)
  • errors.Cause -> internal walker via errors.Unwrap
  • errors.Normalize/Error/MySQLErrorCode/RFCCodeText replaced with a
    local Error type in the terror package

Also drop pingcap/failpoint, the only remaining dependency on
pingcap/errors. Its sole usage in RedactURL was a no-op since no
failpoint enable mechanism is wired up in this codebase.

The redact-mode constants used by parser.Normalize move from
pingcap/errors into the parser package itself.

claude added 3 commits April 26, 2026 21:19
Replace github.com/pingcap/errors throughout the codebase with stdlib
errors and fmt:
- errors.Trace/WithStack drop (no stack tracing)
- errors.Annotate/Annotatef use fmt.Errorf with %w via local helpers
- errors.Errorf -> fmt.Errorf, errors.New -> errors.New (stdlib)
- errors.Cause -> internal walker via errors.Unwrap
- errors.Normalize/Error/MySQLErrorCode/RFCCodeText replaced with a
  local Error type in the terror package

Also drop pingcap/failpoint, the only remaining dependency on
pingcap/errors. Its sole usage in RedactURL was a no-op since no
failpoint enable mechanism is wired up in this codebase.

The redact-mode constants used by parser.Normalize move from
pingcap/errors into the parser package itself.
…-errors-MGFJl

# Conflicts:
#	go.sum
#	mysql/const.go
@kyleconroy kyleconroy merged commit 172ee4d into main Apr 26, 2026
1 check passed
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.

2 participants