pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel



Module Name:    pkgsrc
Committed By:   nikita
Date:           Mon Apr 27 17:15:22 UTC 2020

Modified Files:
        pkgsrc/devel: Makefile
Added Files:
        pkgsrc/devel/go-cmp: DESCR Makefile PLIST buildlink3.mk distinfo

Log Message:
Add devel/go-cmp Version 0.4.0

go-cmp is a package for equality of Go values.

This package is intended to be a more powerful and safer alternative
to reflect.DeepEqual for comparing whether two values are semantically
equal.

The primary features of cmp are:

- When the default behavior of equality does not suit the needs of the
  test, custom equality functions can override the equality
  operation. For example, an equality function may report floats as
  equal so long as they are within some tolerance of each other.

- Types that have an Equal method may use that method to determine
  equality. This allows package authors to determine the equality
  operation for the types that they define.

- If no custom equality functions are used and no Equal method is
  defined, equality is determined by recursively comparing the
  primitive kinds on both values, much like reflect.DeepEqual. Unlike
  reflect.DeepEqual, unexported fields are not compared by default;
  they result in panics unless suppressed by using an Ignore option
  (see cmpopts.IgnoreUnexported) or explicitly compared using the
  AllowUnexported option.


To generate a diff of this commit:
cvs rdiff -u -r1.3112 -r1.3113 pkgsrc/devel/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/go-cmp/DESCR pkgsrc/devel/go-cmp/Makefile \
    pkgsrc/devel/go-cmp/PLIST pkgsrc/devel/go-cmp/buildlink3.mk \
    pkgsrc/devel/go-cmp/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/Makefile
diff -u pkgsrc/devel/Makefile:1.3112 pkgsrc/devel/Makefile:1.3113
--- pkgsrc/devel/Makefile:1.3112        Mon Apr 27 16:31:22 2020
+++ pkgsrc/devel/Makefile       Mon Apr 27 17:15:22 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3112 2020/04/27 16:31:22 nikita Exp $
+# $NetBSD: Makefile,v 1.3113 2020/04/27 17:15:22 nikita Exp $
 #
 
 COMMENT=       Development utilities
@@ -385,6 +385,7 @@ SUBDIR+=    go-bytebufferpool
 SUBDIR+=       go-cast
 SUBDIR+=       go-check
 SUBDIR+=       go-cli
+SUBDIR+=       go-cmp
 SUBDIR+=       go-cobra
 SUBDIR+=       go-colorable
 SUBDIR+=       go-colortext

Added files:

Index: pkgsrc/devel/go-cmp/DESCR
diff -u /dev/null pkgsrc/devel/go-cmp/DESCR:1.1
--- /dev/null   Mon Apr 27 17:15:22 2020
+++ pkgsrc/devel/go-cmp/DESCR   Mon Apr 27 17:15:22 2020
@@ -0,0 +1,24 @@
+go-cmp is a package for equality of Go values.
+
+This package is intended to be a more powerful and safer alternative
+to reflect.DeepEqual for comparing whether two values are semantically
+equal.
+
+The primary features of cmp are:
+
+- When the default behavior of equality does not suit the needs of the
+  test, custom equality functions can override the equality
+  operation. For example, an equality function may report floats as
+  equal so long as they are within some tolerance of each other.
+
+- Types that have an Equal method may use that method to determine
+  equality. This allows package authors to determine the equality
+  operation for the types that they define.
+
+- If no custom equality functions are used and no Equal method is
+  defined, equality is determined by recursively comparing the
+  primitive kinds on both values, much like reflect.DeepEqual. Unlike
+  reflect.DeepEqual, unexported fields are not compared by default;
+  they result in panics unless suppressed by using an Ignore option
+  (see cmpopts.IgnoreUnexported) or explicitly compared using the
+  AllowUnexported option.
Index: pkgsrc/devel/go-cmp/Makefile
diff -u /dev/null pkgsrc/devel/go-cmp/Makefile:1.1
--- /dev/null   Mon Apr 27 17:15:22 2020
+++ pkgsrc/devel/go-cmp/Makefile        Mon Apr 27 17:15:22 2020
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2020/04/27 17:15:22 nikita Exp $
+
+DISTNAME=      go-cmp-0.4.0
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=google/}
+CATEGORIES=    devel
+GITHUB_PROJECT=        go-cmp
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/google/go-cmp
+COMMENT=       Package for comparing Go values in tests
+LICENSE=       modified-bsd
+
+GO_DIST_BASE=  ${DISTNAME}
+GO_SRCPATH=    github.com/google/go-cmp
+
+.include "../../devel/go-xerrors/buildlink3.mk"
+.include "../../lang/go/go-package.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/go-cmp/PLIST
diff -u /dev/null pkgsrc/devel/go-cmp/PLIST:1.1
--- /dev/null   Mon Apr 27 17:15:22 2020
+++ pkgsrc/devel/go-cmp/PLIST   Mon Apr 27 17:15:22 2020
@@ -0,0 +1,56 @@
+@comment $NetBSD: PLIST,v 1.1 2020/04/27 17:15:22 nikita Exp $
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/cmpopts.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/diff.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/flags.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/function.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/testprotos.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/teststructs.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/value.a
+gopkg/src/github.com/google/go-cmp/CONTRIBUTING.md
+gopkg/src/github.com/google/go-cmp/LICENSE
+gopkg/src/github.com/google/go-cmp/README.md
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/equate.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/ignore.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/sort.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/util_test.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/xform.go
+gopkg/src/github.com/google/go-cmp/cmp/compare.go
+gopkg/src/github.com/google/go-cmp/cmp/compare_test.go
+gopkg/src/github.com/google/go-cmp/cmp/example_reporter_test.go
+gopkg/src/github.com/google/go-cmp/cmp/example_test.go
+gopkg/src/github.com/google/go-cmp/cmp/export_panic.go
+gopkg/src/github.com/google/go-cmp/cmp/export_unsafe.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/diff.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/diff_test.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/flags/flags.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/function/func.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/function/func_test.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/testprotos/protos.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project1.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project2.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project3.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project4.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/structs.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/sort.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/sort_test.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/zero.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/zero_test.go
+gopkg/src/github.com/google/go-cmp/cmp/options.go
+gopkg/src/github.com/google/go-cmp/cmp/options_test.go
+gopkg/src/github.com/google/go-cmp/cmp/path.go
+gopkg/src/github.com/google/go-cmp/cmp/report.go
+gopkg/src/github.com/google/go-cmp/cmp/report_compare.go
+gopkg/src/github.com/google/go-cmp/cmp/report_reflect.go
+gopkg/src/github.com/google/go-cmp/cmp/report_slices.go
+gopkg/src/github.com/google/go-cmp/cmp/report_text.go
+gopkg/src/github.com/google/go-cmp/cmp/report_value.go
+gopkg/src/github.com/google/go-cmp/go.mod
+gopkg/src/github.com/google/go-cmp/go.sum
Index: pkgsrc/devel/go-cmp/buildlink3.mk
diff -u /dev/null pkgsrc/devel/go-cmp/buildlink3.mk:1.1
--- /dev/null   Mon Apr 27 17:15:22 2020
+++ pkgsrc/devel/go-cmp/buildlink3.mk   Mon Apr 27 17:15:22 2020
@@ -0,0 +1,16 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/04/27 17:15:22 nikita Exp $
+
+BUILDLINK_TREE+=       go-cmp
+
+.if !defined(GO_CMP_BUILDLINK3_MK)
+GO_CMP_BUILDLINK3_MK:=
+
+BUILDLINK_CONTENTS_FILTER.go-cmp=      ${EGREP} gopkg/
+BUILDLINK_DEPMETHOD.go-cmp?=           build
+
+BUILDLINK_API_DEPENDS.go-cmp+=         go-cmp>=0.4.0
+BUILDLINK_PKGSRCDIR.go-cmp?=           ../../devel/go-cmp
+
+.endif # GO_CMP_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -go-cmp
Index: pkgsrc/devel/go-cmp/distinfo
diff -u /dev/null pkgsrc/devel/go-cmp/distinfo:1.1
--- /dev/null   Mon Apr 27 17:15:22 2020
+++ pkgsrc/devel/go-cmp/distinfo        Mon Apr 27 17:15:22 2020
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/04/27 17:15:22 nikita Exp $
+
+SHA1 (go-cmp-0.4.0.tar.gz) = 9a75761c56d72ff0a50eccaa014f315811796a13
+RMD160 (go-cmp-0.4.0.tar.gz) = dbb7e95152e5bb674920901352bebe0ae0bdcd68
+SHA512 (go-cmp-0.4.0.tar.gz) = f848f5509189e14019eea56abde0e1fdf64a0de666b56270cfbd8832a656376273e3b71be556e0b637f69304c5b7099f1af4e069d6e025961dbafecf969e90ab
+Size (go-cmp-0.4.0.tar.gz) = 81600 bytes



Home | Main Index | Thread Index | Old Index