Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cockroachdb/errors
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.12.0
Choose a base ref
...
head repository: cockroachdb/errors
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.13.0
Choose a head ref
  • 8 commits
  • 9 files changed
  • 5 contributors

Commits on Oct 7, 2025

  1. benchmark: add a benchmark for the errors package

    This is a benchmark created by @rafi. It demonstrates `errors.Is`
    is very inefficient when the reference error does not match the
    input error.
    jeffswenson committed Oct 7, 2025
    Configuration menu
    Copy the full SHA
    35263d8 View commit details
    Browse the repository at this point in the history
  2. errbase: optimize errors.Is

    Previously, `errors.Is` was very inefficient if the reference error did
    not match any errors in the chain.
    
    There were two significant sources of inefficiency:
    1. The code would pessimistically construct the error mark for every
       error in the input error chain. This is O(chain_length^2). This was
       a lot of unnecessary allocations and caused the runtime to be O(n^2)
       in the average case instead of O(n).
    2. The code compared the `Error()` message before comparing the types.
       It is possible to compare error types with zero allocations whereas
       computing the message often requires an allocation.
    jeffswenson committed Oct 7, 2025
    Configuration menu
    Copy the full SHA
    3a21e3d View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2025

  1. Merge pull request #153 from cockroachdb/jeffswenson-optimize-errors-is

    errorbase: optimize errors.Is
    jeffswenson authored Oct 10, 2025
    Configuration menu
    Copy the full SHA
    6480126 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2026

  1. build: bump min Go version to 1.25, add 1.26 to CI matrix

    Also fix a non-constant format string in fmttests that the Go 1.26
    vet checker now flags.
    
    Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
    dhartunian and roachdev-claude committed Apr 22, 2026
    Configuration menu
    Copy the full SHA
    8d8efb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d948846 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #160 from cockroachdb/davidh/bump-go-1.25

    build: bump min Go version to 1.25, add 1.26 to CI
    dhartunian authored Apr 22, 2026
    Configuration menu
    Copy the full SHA
    3c36bbd View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2026

  1. report: migrate Event.Extra to Event.Contexts (sentry-go v0.46+ compat)

    sentry-go v0.46.0 removed the Extra field from sentry.Event (see
    getsentry/sentry-go#1274). ReportError merged its extraDetails map into
    event.Extra, which now fails to compile against sentry-go >= v0.46.0.
    
    Because report_api.go in the root errors package imports the report
    sub-package, the typecheck failure blocks the entire module for every
    downstream consumer -- not just callers of the Sentry reporting code.
    
    Switches the per-key merge to event.Contexts, which is the documented
    replacement. Each extra is stored under sentry.Context{"value": v} to
    conform to the Context schema (map[string]interface{}).
    
    Along the way:
    
    - Adds the new Close() and FlushWithContext(ctx) methods required by the
      v0.46.0 sentry.Transport interface on the test-only interceptingTransport
      in report/report_test.go and fmttests/datadriven_test.go.
    - In the fmttests printer, filters to only Contexts entries that carry
      our "value" sub-key, so Sentry's built-in default contexts
      (device/os/runtime/trace) emitted by sentry.NewEvent() do not leak into
      fixtures. Preserves the "== Extra" label -- net fixture diff is empty.
    - Fixes a pre-existing non-constant-format-string call in
      fmttests/datadriven_test.go flagged by the stricter go vet in the Go
      toolchain now required by sentry-go v0.46.0.
    - Bumps the go directive to 1.25.0 (drops the no-longer-needed toolchain
      line) because sentry-go v0.46.0 itself declares go 1.25.0.
    
    Fixes #158
    denniszag committed Apr 25, 2026
    Configuration menu
    Copy the full SHA
    ad7454c View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2026

  1. Merge pull request #159 from denniszag/fix/sentry-go-v0.46-compat

    report: migrate Event.Extra to Event.Contexts (sentry-go v0.46+ compat)
    dhartunian authored Apr 27, 2026
    Configuration menu
    Copy the full SHA
    fc93249 View commit details
    Browse the repository at this point in the history
Loading