Skip to content

Remove direct dependency on golang.org/x/exp#4944

Merged
pietern merged 2 commits into
mainfrom
check-exp
Apr 13, 2026
Merged

Remove direct dependency on golang.org/x/exp#4944
pietern merged 2 commits into
mainfrom
check-exp

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented Apr 13, 2026

Summary

  • Replace all golang.org/x/exp/maps usage with stdlib equivalents (maps and slices packages)
  • maps.Clone/maps.Copy are drop-in replacements (Go 1.21+)
  • maps.Keys/maps.Values return iterators in stdlib (Go 1.23+), so slice-consuming call sites are wrapped with slices.Collect
  • Remove golang.org/x/exp from NOTICE file; it remains as an indirect dependency through databricks-sdk-go

This pull request was AI-assisted by Isaac.

pietern added 2 commits April 13, 2026 15:35
All usage was `maps.Keys`, `maps.Values`, `maps.Clone`, and `maps.Copy`
from the `golang.org/x/exp/maps` package. These have been available in
the Go standard library since:

- `maps.Clone` and `maps.Copy`: Go 1.21
- `maps.Keys` and `maps.Values`: Go 1.23 (as iterator-returning functions)

The stdlib `maps.Keys`/`maps.Values` return `iter.Seq` instead of a
slice, so call sites are wrapped with `slices.Collect` where a slice
is needed. Call sites already using `slices.Sorted(maps.Keys(...))` work
as-is since `slices.Sorted` accepts an iterator.

The module remains as an indirect dependency through databricks-sdk-go.

Co-authored-by: Isaac
@pietern pietern enabled auto-merge April 13, 2026 13:38
@pietern pietern added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit c7771a8 Apr 13, 2026
30 of 31 checks passed
@pietern pietern deleted the check-exp branch April 13, 2026 14:23
denik pushed a commit that referenced this pull request May 20, 2026
## Summary

- Replace all `golang.org/x/exp/maps` usage with stdlib equivalents
(`maps` and `slices` packages)
- `maps.Clone`/`maps.Copy` are drop-in replacements (Go 1.21+)
- `maps.Keys`/`maps.Values` return iterators in stdlib (Go 1.23+), so
slice-consuming call sites are wrapped with `slices.Collect`
- Remove `golang.org/x/exp` from NOTICE file; it remains as an indirect
dependency through databricks-sdk-go

This pull request was AI-assisted by Isaac.
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