sharlatan pushed a commit to branch go-team
in repository guix.
commit 31308ba18c4e7f7093df51c589583f7f1a812113
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Feb 18 09:30:04 2025 +0000
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
---
gnu/packages/golang-xyz.scm | 55 ++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 28 deletions(-)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 915d7c90d0..86ecccb05c 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -17440,45 +17440,44 @@ instead of requiring an interval clock to fill the
bucket discretely.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(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)
(arguments
(list
#:import-path "go.uber.org/zap"
#:test-flags
- #~(list "-skip" (string-join
- ;; Unexpected stack trace annotation.
- (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"))))))))
+ ;; Failed to run 'go mod download'
+ #~(list "-skip" "TestStacktraceFiltersVendorZap")))
(native-inputs
(list go-github-com-stretchr-testify
go-go-uber-org-goleak))
(propagated-inputs
(list go-go-uber-org-multierr
go-gopkg-in-yaml-v3))
- (home-page "https://pkg.go.dev/go.uber.org/zap")
- (synopsis "Logging library for Go")
- (description
- "This package provides a library for fast, structured, leveled logging in
-Go.")
+ (home-page "https://github.com/uber-go/zap")
+ (synopsis "Structured and leveled logging in Golang")
+ (description
+ "This package implements a reflection-free, zero-allocation JSON encoder,
+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)))
(define-public go-google-golang-org-appengine