Conversation
ccoVeille
force-pushed
the
gospew-panic
branch
from
November 28, 2025 11:39
4d0daaa to
6375125
Compare
ccoVeille
marked this pull request as ready for review
November 28, 2025 11:39
Contributor
|
@ccoVeille Looks good! ✅ |
fredbi
added a commit
to fredbi/testify
that referenced
this pull request
Jan 2, 2026
This PR adapts stretchr#1828 It fixes an edge case the spew lib when diffing a map with keys of type array. Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
5 tasks
fredbi
added a commit
to go-openapi/testify
that referenced
this pull request
Jan 2, 2026
This PR adapts stretchr#1828 It fixes an edge case the spew lib when diffing a map with keys of type array. Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Contributor
|
Let's merge this? Then we can also close #1816. |
dolmen
approved these changes
Feb 17, 2026
Contributor
|
@ccoVeille Let's merge? |
Collaborator
Author
|
I tend to not merge my own PR on a public repository. Also, the release cycle of testify is slow paced. @dolmen reviewed the changes and approved it. Maybe @brackendawson could review them. |
Collaborator
|
Results in such maps not being sorted: func TestIfy(t *testing.T) {
type test struct {
m map[[1]byte]*struct{}
}
a := test{
map[[1]byte]*struct{}{
{1}: nil,
{2}: nil,
},
}
b := test{
map[[1]byte]*struct{}{
{2}: nil,
{3}: nil,
{1}: nil,
},
}
assert.Equal(t, a, b)
}This is better than a panic. We're able to format the map keys, so I wonder if we can fall back on a string sorting of the formatted values? |
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.
Summary
Fix panic that happens when spew tries to sort unexported fields
Changes
Fix the panic raised by Interface() on unexported fields
CanInterface() is the solution
Motivation
Now, go-spew is vendored, we can fix old issues we had
Related issues