Closed
Description
I ran into the following errors while trying to update the Debian "golang-github-google-go-github" packaging from v32.1.0 to v38.1.0
=== RUN TestParseWebPageEndpoints_ActivityEvents
--- FAIL: TestParseWebPageEndpoints_ActivityEvents (0.00s)
panic: cannot handle unexported field at {*main.Endpoint}.endpointName:
"github.com/google/go-github/update-urls".Endpoint
consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported [recovered]
panic: cannot handle unexported field at {*main.Endpoint}.endpointName:
"github.com/google/go-github/update-urls".Endpoint
consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported
goroutine 10 [running]:
testing.tRunner.func1.1(0x674320, 0xc00023f330)
/usr/lib/go-1.15/src/testing/testing.go:1072 +0x30d
testing.tRunner.func1(0xc0001be900)
/usr/lib/go-1.15/src/testing/testing.go:1075 +0x41a
panic(0x674320, 0xc00023f330)
/usr/lib/go-1.15/src/runtime/panic.go:969 +0x1b9
github.com/google/go-cmp/cmp.validator.apply(0xc000115360, 0x674320, 0xc00024c6e0, 0x1b8, 0x674320, 0xc00010afd0, 0x1b8)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/options.go:244 +0x68f
github.com/google/go-cmp/cmp.(*state).tryOptions(0xc000115360, 0x7b9da0, 0x674320, 0x674320, 0xc00024c6e0, 0x1b8, 0x674320, 0xc00010afd0, 0x1b8, 0xc0001be7a0)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:303 +0x132
github.com/google/go-cmp/cmp.(*state).compareAny(0xc000115360, 0x7b75c0, 0xc00018dd00)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:258 +0x2ef
github.com/google/go-cmp/cmp.(*state).compareStruct(0xc000115360, 0x7b9da0, 0x6b92c0, 0x6b92c0, 0xc00024c6e0, 0x199, 0x6b92c0, 0xc00010afd0, 0x199)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:427 +0x685
github.com/google/go-cmp/cmp.(*state).compareAny(0xc000115360, 0x7b7500, 0xc000242ec0)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:286 +0xe35
github.com/google/go-cmp/cmp.(*state).comparePtr(0xc000115360, 0x7b9da0, 0x687a60, 0x687a60, 0xc00024c6e0, 0x16, 0x687a60, 0xc00010afd0, 0x16)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:579 +0x333
github.com/google/go-cmp/cmp.(*state).compareAny(0xc000115360, 0x7b6380, 0xc000242e80)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:292 +0xcbf
github.com/google/go-cmp/cmp.Equal(0x687a60, 0xc00024c6e0, 0x687a60, 0xc00010afd0, 0x0, 0x0, 0x0, 0x92cee0)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-cmp/cmp/compare.go:94 +0x9d
github.com/google/go-github/update-urls.testWebPageHelper(0xc0001be900, 0xc000237c50, 0xc000074f90)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-github/update-urls/main_test.go:554 +0x1ab
github.com/google/go-github/update-urls.TestParseWebPageEndpoints_ActivityEvents(0xc0001be900)
/home/foka/debian/go-team/google/golang-github-google-go-github/_build/src/github.com/google/go-github/update-urls/activity-events_test.go:50 +0x5d
testing.tRunner(0xc0001be900, 0x7797f0)
/usr/lib/go-1.15/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
/usr/lib/go-1.15/src/testing/testing.go:1168 +0x2b3
FAIL github.com/google/go-github/update-urls 0.013s
FAIL
dh_auto_test: error: cd _build && go test -vet=off -v -p 4 github.com/google/go-github/github github.com/google/go-github/update-urls returned exit code 1
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
I could not reproduce the error with go test -v ./...
until I realized that go test -v ./...
skips over update-urls
altogether (since go list ./...
does not show it.
$ go test -v ./update-urls
main module (github.com/google/go-github/v38) does not contain package github.com/google/go-github/v38/update-urls
And running the following command manually:
$ go test -v github.com/google/go-github/update-urls
or
$ cd update-urls && go test -v ./...
reproduces the panic above.
I notice the GitHub workflow does not test update-urls
either, so perhaps that's why this panic wasn't caught earlier.
(for Debian packaging, I'll probably just skip update-urls
now that I realize it is not intended to be run by end users.)
Metadata
Metadata
Assignees
Labels
No labels