all: update golang/x/ext and fix slice sorting fallout#27909
Merged
fjl merged 6 commits intoethereum:masterfrom Aug 11, 2023
karalabe:sortupdate
Merged
all: update golang/x/ext and fix slice sorting fallout#27909fjl merged 6 commits intoethereum:masterfrom karalabe:sortupdate
fjl merged 6 commits intoethereum:masterfrom
karalabe:sortupdate
Conversation
holiman
reviewed
Aug 11, 2023
| slices.SortFunc(badBlocks, func(a, b *badBlock) int { | ||
| // Note: sorting in descending number order. | ||
| return a.Header.Number.Uint64() >= b.Header.Number.Uint64() | ||
| return -a.Header.Number.Cmp(b.Header.Number) |
Contributor
There was a problem hiding this comment.
Suggested change
| return -a.Header.Number.Cmp(b.Header.Number) | |
| return b.Header.Number.Cmp(a.Header.Number) |
Alternative version is to just swap the arguments. Use with whichever you feel like
|
|
||
| // Less defines the canonical sorting order of capabilities. | ||
| func (cap Cap) Less(other Cap) bool { | ||
| func (cap Cap) Less(other Cap) int { |
Contributor
There was a problem hiding this comment.
Suggested change
| func (cap Cap) Less(other Cap) int { | |
| func (cap Cap) Cmp(other Cap) int { |
Wouldn't that be more correct? Adds more fallout, sorry ...
fjl
pushed a commit
that referenced
this pull request
Aug 12, 2023
The Go authors updated golang/x/ext to change the function signature of the slices sort method. It's an entire shitshow now because x/ext is not tagged, so everyone's codebase just picked a new version that some other dep depends on, causing our code to fail building. This PR updates the dep on our code too and does all the refactorings to follow upstream...
devopsbo3
pushed a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
The Go authors updated golang/x/ext to change the function signature of the slices sort method. It's an entire shitshow now because x/ext is not tagged, so everyone's codebase just picked a new version that some other dep depends on, causing our code to fail building. This PR updates the dep on our code too and does all the refactorings to follow upstream...
devopsbo3
added a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
…eum#27909)" This reverts commit 1c411fc.
devopsbo3
added a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
…eum#27909)" This reverts commit 1c411fc.
gartnera
added a commit
to zeta-chain/ethermint
that referenced
this pull request
Jul 24, 2024
We cannot upgrade beyond 1.12.1 because of the x/ext slices mess: - ethereum/go-ethereum#27909 - cosmos/cosmos-sdk#20159
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Nov 13, 2024
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Dec 13, 2024
Co-authored-by: Felix Lange <fjl@twurst.com>
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jun 26, 2025
Co-authored-by: Felix Lange <fjl@twurst.com>
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 30, 2025
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Oct 30, 2025
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Nov 28, 2025
AnilChinchawale
pushed a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Dec 7, 2025
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jan 26, 2026
Co-authored-by: Felix Lange <fjl@twurst.com>
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jan 26, 2026
Co-authored-by: Felix Lange <fjl@twurst.com>
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jan 26, 2026
Co-authored-by: Felix Lange <fjl@twurst.com>
AnilChinchawale
pushed a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Jan 29, 2026
…1163) Co-authored-by: Dan Laine <daniel.laine@avalabs.org> Co-authored-by: Felix Lange <fjl@twurst.com>
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.
The Go authors updated golang/x/ext to change the function signature of the slices sort method. It's an entire shitshow now because x/ext is not tagged, so everyone's codebase just picked a new version that some other dep depends on, causing our code to fail building.
This PR updates the dep on our code too and does all the refactorings to follow upstream...
Fixes #27897