x/exp/apidiff: incorrectly reports incompatible change in type alias #65112
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.21.6 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I maintain a tool (https://github.com/joelanford/go-apidiff) that uses
golang.org/x/exp/apidiff
to compare two commits of a git repository to build a report on compatible/incompatible changes (thanks for doing all of the heavy lifting!).This tool is used by the sigs.k8s.io/controller-runtime project to help its maintainers see when PRs making breaking changes.
I bumped go-apidiff's dependency to https://github.com/golang/exp/tree/db7319d0e0e361ccef5c449b760df8e5f2d5087c
Then, I used a build of go-apidiff with this dependency on controller-runtime, comparing commits with no code changes whatsoever. See kubernetes-sigs/controller-runtime#2654
What did you see happen?
I saw the
go-apidiff
run fail: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_controller-runtime/2654/pull-controller-runtime-apidiff/1747021423471235072Relevant output:
What did you expect to see?
I expected to see no diff produced.
I bisected changes in
golang.org/x/exp/apidiff
and found that commit https://github.com/golang/exp/tree/89c5cff77bcbacf5bc89bd83d69d4fa8c80cf8af is when this unexpected diff report begins.If I downgrade to https://github.com/golang/exp/tree/3b0b5b66b5f19dc18cc54ec01e4b9d7906761f14, I see the expected output.
The text was updated successfully, but these errors were encountered: