Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go.mod: update dependencies #217

Merged
merged 2 commits into from Mar 14, 2021
Merged

Conversation

thaJeztah
Copy link
Contributor

@thaJeztah thaJeztah commented Mar 14, 2021

go.mod: github.com/pkg/errors v0.9.1

This version provides compatibility with Go 1.3+ native error wrapping

go.mod: github.com/google/go-cmp v0.5.5

Version v0.5.x provides various improvements to the reporter output;
https://github.com/google/go-cmp/releases

full diff: google/go-cmp@v0.4.0...v0.5.5

This version provides compatibility with Go 1.3+ native error wrapping

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Contributor Author

thaJeztah commented Mar 14, 2021

Ah, looks like some changes are needed in a test (possibly different output format?)
=== RUN   TestPathField
    opt_test.go:249: assertion failed: 
        --- matches
        +++ expected
          []string{
          	"{opt.node}.Value.Value",
        + 	"{opt.node}.Children[0].Value.Value",
        + 	"{opt.node}.Children[1].Value.Value",
          	"{opt.node}.Children[2].Value.Value",
          	"{opt.node}.Children[2].Ref.Value.Value",
        - 	"{opt.node}.Children[1].Value.Value",
        - 	"{opt.node}.Children[0].Value.Value",
          	"{opt.node}.Children[0].Value.Value",
          	"{opt.node}.Children[1].Value.Value",
          	... // 2 identical elements
          }
        
--- FAIL: TestPathField (0.00s)

edit: breakage is in golang.org/x/tools; perhaps better to include in #218

@thaJeztah
Copy link
Contributor Author

sigh.. so it was just random; issue looks to be in go-cmp

@thaJeztah thaJeztah force-pushed the bump_deps branch 2 times, most recently from e293578 to 2e30eeb Compare March 14, 2021 11:57
@@ -167,6 +168,7 @@ func (p *pathRecorder) record(path gocmp.Path) bool {
func matchPaths(fixture interface{}, filter func(gocmp.Path) bool) []string {
rec := &pathRecorder{filter: filter}
gocmp.Equal(fixture, fixture, gocmp.FilterPath(rec.record, gocmp.Ignore()))
sort.Strings(matches)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like go-cmp filter now may result in results to be returned in
random random order; this sorts the results before comparing, but I'm
not sure if order is important (in which case this could actually be
a bug)

Version v0.5.x provides various improvements to  the reporter output;
https://github.com/google/go-cmp/releases

full diff: google/go-cmp@v0.4.0...v0.5.5

Looks like go-cmp filter now may result in results to be returned in
random random order; this sorts the results before comparing, but I'm
not sure if order is important (in which case this could actually be
a bug)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 65c6ba6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Contributor Author

looks like CI is hitting concurrency limits 😞

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The order shouldn't matter, because the filter will be applied to all matches. These filters have been difficult to test. It is not the first time that an upgrade has broken these tests.

@dnephin dnephin merged commit c280cb4 into gotestyourself:main Mar 14, 2021
@thaJeztah thaJeztah deleted the bump_deps branch March 14, 2021 18:58
@thaJeztah
Copy link
Contributor Author

Thanks for confirming; I wasn't entirely sure, so thought I'd best call it out 👍 🤗

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.

None yet

2 participants