Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: google/go-cmp
base: v0.5.9
Choose a base ref
...
head repository: google/go-cmp
compare: v0.6.0
Choose a head ref
  • 6 commits
  • 15 files changed
  • 5 contributors

Commits on Feb 22, 2023

  1. Remove purego fallbacks (#325)

    Having go-cmp panic when using the purego build tag makes it hard to use
    go-cmp for testing packages that themselves have purego fallbacks.
    
    Since go-cmp can't implement its functionality without unsafe (the
    "fallback" panics) and since environments that prohibit unsafe are much
    less common these days anyway, simply remove purego code entirely.
    
    Fixes #283.
    cespare committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    571a56b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3bb304a View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    8cea5de View commit details
    Browse the repository at this point in the history
  2. set workflow permission to read-only (#327)

    Co-authored-by: Damien Neil <[email protected]>
    rsc and neild committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    8a3e8dd View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2023

  1. Use of hotlinking of Go identifiers (#337)

    GoDoc now supports hot linking to specific Go identifiers.
    Use that feature to enhance the usability of cmp docs.
    
    Since cmp lacks a direct dependency on cmpopts,
    you are forced to use the fully-qualified import path
    to references identifiers in the cmpopts package.
    
    It can future improvements to the go/doc to handle this case,
    either by rendering the doc with short form,
    or by detecting the use of cmpopts from the unit tests as well
    (since those can break circular dependencies).
    dsnet committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    e250a55 View commit details
    Browse the repository at this point in the history
  2. Add cmpopts.EquateComparable (#340)

    This helper function makes it easier to specify that comparable types
    are safe to directly compare with the == operator in Go.
    
    The API does not use generics as it follows existing options like
    cmp.AllowUnexported, cmpopts.IgnoreUnexported, or cmpopts.IgnoreTypes.
    
    While generics provides type safety, the user experience is not as nice.
    Our current API allows multiple types to be specified:
    	cmpopts.EquateComparable(netip.Addr{}, netip.Prefix{})
    While generics would not allow variadic arguments:
    	cmpopts.EquateComparable[netip.Addr]()
    	cmpopts.EquateComparable[netip.Prefix]()
    
    Bump mininimum supported Go to 1.18 for net/netip type.
    Start testing on Go 1.21.
    
    Fixes #339
    dsnet committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    c3ad843 View commit details
    Browse the repository at this point in the history