refactor: use stdlib maps and slices instead of golang.org/x/exp#9482
Open
mmmommm wants to merge 1 commit into
Open
refactor: use stdlib maps and slices instead of golang.org/x/exp#9482mmmommm wants to merge 1 commit into
mmmommm wants to merge 1 commit into
Conversation
Signed-off-by: Kise Ryota <kiseryota.contact@gmail.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
While working on #9478, I noticed that several packages still import golang.org/x/exp/maps and golang.org/x/exp/slices, even though they only use functions that now have drop-in equivalents in the standard library maps/slices packages.
These
golang.org/x/expfunctions also carry //go:fix inline directives, so gopls reports ashould be inlinedhint at every call site.This PR replaces the
golang.org/x/exp/mapsandgolang.org/x/exp/slicesimports with the standard library maps/slices. The call sites are unchanged because the signatures are identical, andgolang.org/x/expis demoted to an indirect dependency in go.mod.Functions whose standard-library form differs (e.g. maps.Keys/maps.Values, which return iterators in the stdlib) are not used anywhere, so this is a pure, behavior-preserving refactor.
Which issue(s) this PR fixes:
Fixes #
PR Checklist
git commit -s). See DCO: Sign your work./api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.make generate gen-check,make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, butgen-check,lint, and coverage MUST pass.)release-notes/current/<section>/<pr-number>-<slug>.md(seerelease-notes/current/README.mdfor sections and naming). N/A if this PR does not contain non-trivial changes.make gen-checkand committed the result if API/helm charts/modules changed.release-notes/current/breaking_changes/.