Skip to content

Drop irrelevant deps in bindings/go#371

Merged
jupblb merged 4 commits intomainfrom
michal/go-bindings-deps
Feb 26, 2026
Merged

Drop irrelevant deps in bindings/go#371
jupblb merged 4 commits intomainfrom
michal/go-bindings-deps

Conversation

@jupblb
Copy link
Member

@jupblb jupblb commented Feb 26, 2026

Since this library is used in other projects it should propagate as few transitive dependencies as possible.

Remove the github.com/cockroachdb/errors dependency and replace all
usages with standard library equivalents:
- errors.New (stdlib)
- fmt.Errorf with %w for wrapping
- errors.Join for combining errors

This also removes ~6 transitive dependencies (cockroachdb/logtags,
cockroachdb/redact, getsentry/sentry-go, gogo/protobuf, pkg/errors).

Fixes a pre-existing bug in readVarint where errors.Newf was missing
the loop index argument for the %d format verb.
The slices package has been in stdlib since Go 1.21. This removes the
golang.org/x/exp dependency from bindings/go/scip/go.mod.
Replace autogold snapshot assertions with require.Equal in
source_file_test.go and position_test.go. This removes autogold/v2
and its 6 transitive indirect deps (valast, lockfile, x/mod, x/sync,
x/tools, gofumpt).
@jupblb jupblb force-pushed the michal/go-bindings-deps branch from 644161b to 63e93bf Compare February 26, 2026 11:08
@jupblb jupblb merged commit 96b8bca into main Feb 26, 2026
10 checks passed
@jupblb jupblb deleted the michal/go-bindings-deps branch February 26, 2026 11:19
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.

1 participant