Skip to content

x/exp/apidiff: ignore "internal" packages during comparison #52864

@pohly

Description

@pohly

What version of Go are you using (go version)?

$ go version
1.13 (only for building)

Does this issue reproduce with the latest release?

Yes (of apidiff).

What did you do?

We use apidiff in a Go project to prevent merging of PRs which break the API:
https://github.com/kubernetes/klog/blob/main/hack/verify-apidiff.sh

One PR removes an exported function from "internal/serialize": kubernetes/klog#326

What did you expect to see?

apidiff should not complain.

What did you see instead?

https://github.com/kubernetes/klog/runs/6372237998?check_suite_focus=true

Inspecting API of ../old...
go: downloading github.com/go-logr/logr v1.2.0
go: extracting github.com/go-logr/logr v1.2.0
go: finding github.com/go-logr/logr v1.2.0
Comparing with ../old...
FAIL: k8s.io/klog/v2/internal/serialize contains incompatible changes:
- TrimDuplicates: removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions