mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-13 18:40:57 +02:00
gnu: go-go-uber-org-zap: Improve package.
* gnu/packages/golang-xyz.scm (go-go-uber-org-zap) [source] <snippet>: Remove all submodules containing go.mod. [arguments] <test-flags>: Skip just one test. <phases>: Remove 'remove-examples-and-benchmarks as redundant. [home-page]: Fix lint warning. [synopsis]: Reword it according to project's README. [description]: Likewise. Change-Id: I94c4491ff22823c958610e9adf2ac051da6a6180
This commit is contained in:
parent
bb867460c7
commit
35ad7c90a9
1 changed files with 26 additions and 27 deletions
|
@ -17440,45 +17440,44 @@ instead of requiring an interval clock to fill the bucket discretely.")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1h3ml2wqmdxwqv0xdfqvf7l4wma5yd0hdfsa6189mmbhkhzn8v3m"))))
|
(base32 "1h3ml2wqmdxwqv0xdfqvf7l4wma5yd0hdfsa6189mmbhkhzn8v3m"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
#~(begin
|
||||||
|
;; Submodules with their own go.mod files and packaged separately:
|
||||||
|
;;
|
||||||
|
;; - go.uber.org/zap/assets
|
||||||
|
;; - go.uber.org/zap/benchmarks
|
||||||
|
;; - go.uber.org/zap/exp
|
||||||
|
;; - go.uber.org/zap/tools
|
||||||
|
;; - go.uber.org/zap/zapgrpc/internal/test
|
||||||
|
(for-each delete-file-recursively
|
||||||
|
(list "assets"
|
||||||
|
"benchmarks"
|
||||||
|
"exp"
|
||||||
|
"tools"
|
||||||
|
"zapgrpc/internal/test"))))))
|
||||||
(build-system go-build-system)
|
(build-system go-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:import-path "go.uber.org/zap"
|
#:import-path "go.uber.org/zap"
|
||||||
#:test-flags
|
#:test-flags
|
||||||
#~(list "-skip" (string-join
|
;; Failed to run 'go mod download'
|
||||||
;; Unexpected stack trace annotation.
|
#~(list "-skip" "TestStacktraceFiltersVendorZap")))
|
||||||
(list "TestAddStackSkip"
|
|
||||||
;; Expected to find package name and file name in
|
|
||||||
;; output.
|
|
||||||
"TestLoggerAddCaller"
|
|
||||||
"TestSugarAddCaller")
|
|
||||||
"|"))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(add-after 'unpack 'remove-examples-and-benchmarks
|
|
||||||
(lambda* (#:key tests? import-path #:allow-other-keys)
|
|
||||||
(with-directory-excursion (string-append "src/" import-path)
|
|
||||||
(for-each delete-file-recursively
|
|
||||||
(list "benchmarks"
|
|
||||||
;; Remove test files requiring to download all
|
|
||||||
;; dependencies for the current Go module and
|
|
||||||
;; reports their module paths and locations on
|
|
||||||
;; disk.
|
|
||||||
"stacktrace_ext_test.go"
|
|
||||||
;; Not packed yet google.golang.org/grpc.
|
|
||||||
"zapgrpc/internal/test/grpc_test.go"))))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list go-github-com-stretchr-testify
|
(list go-github-com-stretchr-testify
|
||||||
go-go-uber-org-goleak))
|
go-go-uber-org-goleak))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list go-go-uber-org-multierr
|
(list go-go-uber-org-multierr
|
||||||
go-gopkg-in-yaml-v3))
|
go-gopkg-in-yaml-v3))
|
||||||
(home-page "https://pkg.go.dev/go.uber.org/zap")
|
(home-page "https://github.com/uber-go/zap")
|
||||||
(synopsis "Logging library for Go")
|
(synopsis "Structured and leveled logging in Golang")
|
||||||
(description
|
(description
|
||||||
"This package provides a library for fast, structured, leveled logging in
|
"This package implements a reflection-free, zero-allocation JSON encoder,
|
||||||
Go.")
|
and the base Logger strives to avoid serialization overhead and allocations
|
||||||
|
wherever possible. By building the high-level @code{SugaredLogger} on that
|
||||||
|
foundation, zap lets users choose when they need to count every allocation and
|
||||||
|
when they'd prefer a more familiar, loosely typed API.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public go-google-golang-org-appengine
|
(define-public go-google-golang-org-appengine
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue