[PATCH 00/13] Add scc

  • Done
  • quality assurance status badge
Details
4 participants
  • Fries
  • Maxim Cournoyer
  • (
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Fries
Severity
normal
Merged with
F
F
Fries wrote on 5 Aug 2023 09:00
(address . guix-patches@gnu.org)(name . Fries)(address . fries1234@protonmail.com)
cover.1691218710.git.fries1234@protonmail.com
This patch series adds the scc command line tool which is a fast Go
based code counter can calculate the COCOMO cost estimation model for
your codebase and the complexity of your codebase.

I added the various go packages that scc depends on to the golang.scm
module and scc to code.scm.

Fries (13):
gnu: Add go-github-com-chyzer-logex
gnu: Add go-github-com-chyzer-test
gnu: Add go-github-com-chyzer-readline
gnu: Add go-github-com-ianlancetaylor-demangle
gnu: Add go-github-com-google-pprof
gnu: Add go-github-com-felixge-fgprof
gnu: Add go-github-com-pkg-profile
gnu: Add go-github-com-karrick-godirwalk
gnu: Add go-github-com-dbaggerman-cuba
gnu: Add go-github-com-modern-go-concurrent
gnu: Add go-github-com-modern-go-reflect2
gnu: Add go-github-com-json-iterator-go
gnu: Add scc

gnu/packages/code.scm | 36 ++
gnu/packages/golang.scm | 320 ++++++++++++++++++
...go-github-com-chzyer-logex-fix-tests.patch | 28 ++
3 files changed, 384 insertions(+)
create mode 100644 gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch


base-commit: 42ae42cf41e8f5e88422e30d801251a3427d7f3b
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 11:30
Merge bugs
(address . control@debbugs.gnu.org)
6131230.DvuYhMxLoT@pc
merge 65075 65072 65076 65073 65078 65077 65079 65082 65080 65081 65084 65085 65083 65074
# accidently sent my patch series to the mailing list instead the cover letters bug
quit
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 01/13] gnu: Add go-github-com-chyzer-logex
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
fd080f3896fe6a1203f84e110009ab7771e412d9.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-chyzer-logex): New variable.
* gnu/packages/patches/go-github-com-chyzer-logex-fix-tests.patch: New file.
---
gnu/packages/golang.scm | 25 +++++++++++++++++
...go-github-com-chzyer-logex-fix-tests.patch | 28 +++++++++++++++++++
2 files changed, 53 insertions(+)
create mode 100644 gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch

Toggle diff (79 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ea6aadbe80..7005515bb2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2022 Christopher Howard <christopher@librehacker.com>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
+;;; Copyright © 2023 Fries <fries1234@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2112,6 +2113,30 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-chzyer-logex
+ (package
+ (name "go-github-com-chzyer-logex")
+ (version "1.2.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chzyer/logex")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0c9yr3r7dl3lcs22cvmh9iknihi9568wzmdywmc2irkjdrn8bpxw"))
+ (patches (search-patches
+ "go-github-com-chzyer-logex-fix-tests.patch"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/chzyer/logex"))
+ (home-page "https://github.com/chzyer/logex")
+ (synopsis "Golang log library")
+ (description "A Golang log library that supports tracing and log levels
+that works by wrapping the standard log library.")
+ (license license:expat)))
+
(define-public go-github-com-blanu-dust
(package
(name "go-github-com-blanu-dust")
diff --git a/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch b/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch
new file mode 100644
index 0000000000..2a9b7a228b
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch
@@ -0,0 +1,28 @@
+From bb4921ff5ab77a047ae46d3da0f35abbe3f01f41 Mon Sep 17 00:00:00 2001
+From: Fries <fries1234@protonmail.com>
+Date: Fri, 4 Aug 2023 20:06:20 -0700
+Subject: [PATCH] fix logex tests
+
+---
+ logex_test.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/logex_test.go b/logex_test.go
+index e6027f2..4c07d45 100644
+--- a/logex_test.go
++++ b/logex_test.go
+@@ -46,9 +46,9 @@ func TestLogex(t *testing.T) {
+
+ except := []string{
+ ".test:logex_test.go:19]aa",
+- ".test:logex_test.go:20][INFO] b",
++ ".TestLogex:logex_test.go:42][INFO] b",
+ ".test:logex_test.go:21][INFO] c",
+- ".test:logex_test.go:22][ERROR] ec",
++ ".TestLogex:logex_test.go:42][ERROR] ec",
+ ".(*S).hello:logex_test.go:11][WARN] warn in hello",
+ }
+
+--
+2.41.0
+
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 00/13] Add scc
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
cover.1691233116.git.fries1234@protonmail.com
This revision of the scc patch series fixes some bad practices. scc has
been confirmed to build on x86-64-linux, aarch64-linux, and
riscv64-linux system targets.

Fries (13):
gnu: Add go-github-com-chyzer-logex
gnu: Add go-github-com-chyzer-test
gnu: Add go-github-com-chyzer-readline
gnu: Add go-github-com-ianlancetaylor-demangle
gnu: Add go-github-com-google-pprof
gnu: Add go-github-com-felixge-fgprof
gnu: Add go-github-com-pkg-profile
gnu: Add go-github-com-karrick-godirwalk
gnu: Add go-github-com-dbaggerman-cuba
gnu: Add go-github-com-modern-go-concurrent
gnu: Add go-github-com-modern-go-reflect2
gnu: Add go-github-com-json-iterator-go
gnu: Add scc

gnu/packages/code.scm | 35 ++
gnu/packages/golang.scm | 311 ++++++++++++++++++
...go-github-com-chzyer-logex-fix-tests.patch | 28 ++
3 files changed, 374 insertions(+)
create mode 100644 gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch


base-commit: 42ae42cf41e8f5e88422e30d801251a3427d7f3b
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 02/13] gnu: Add go-github-com-chyzer-test
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
c457d2541601d924e654e8c39a5e3b57e4380295.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-chyzer-test): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 7005515bb2..171bd3bdb5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,30 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-chzyer-test
+ (package
+ (name "go-github-com-chzyer-test")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chzyer/test")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1axdlcnx2qjsn5wsr2pr1m0w0a8k4nk5kkrngh742fgh81vzzy8s"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:tests? #f ;; Tests relating to a in-memory disk fail due to a Segfault.
+ #:import-path "github.com/chzyer/test"))
+ (propagated-inputs
+ (list go-github-com-chzyer-logex))
+ (home-page "https://github.com/chzyer/test")
+ (synopsis "Testing library for Go")
+ (description "A testing library for Go programs.")
+ (license license:expat)))
+
(define-public go-github-com-chzyer-logex
(package
(name "go-github-com-chzyer-logex")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 04/13] gnu: Add go-github-com-ianlancetaylor-demangle
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
418f0b68c4e1a600e63f9aa971b0dd1fc0d58e90.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-ianlancetaylor-demangle): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cc8c2357b6..81e2a12305 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,31 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-ianlancetaylor-demangle
+ (package
+ (name "go-github-com-ianlancetaylor-demangle")
+ (version "0.0.0-20230524184225-eabc099b10ab")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ianlancetaylor/demangle")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pvlg1adp50hnw8dz7il473xb197ixirg26cy5hj3ngb4qlajwvc"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/ianlancetaylor/demangle"))
+ (home-page "https://github.com/ianlancetaylor/demangle")
+ (synopsis "Symbol name demangler written in Go")
+ (description
+ "This package defines functions that demangle GCC/LLVM C++ and Rust symbol
+names. This package recognizes names that were mangled according to the C++ ABI
+defined at https://codesourcery.com/cxx-abi/ and the Rust ABI defined at
+https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html.")
+ (license license:bsd-3)))
+
(define-public go-github-com-chzyer-readline
(package
(name "go-github-com-chzyer-readline")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 03/13] gnu: Add go-github-com-chyzer-readline
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
6719ec05e59cd4893ce47ab8cc7963bb21030308.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-chyzer-readline): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 171bd3bdb5..cc8c2357b6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,30 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-chzyer-readline
+ (package
+ (name "go-github-com-chzyer-readline")
+ (version "1.5.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chzyer/readline")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1msh9qcm7l1idpmfj4nradyprsr86yhk9ch42yxz7xsrybmrs0pb"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/chzyer/readline"))
+ (propagated-inputs (list go-github-com-chzyer-logex go-golang-org-x-sys
+ go-github-com-chzyer-test))
+ (home-page "https://github.com/chzyer/readline")
+ (synopsis "Pure Go readline library")
+ (description
+ "Readline is a pure Go implementation of a GNU-Readline like library.")
+ (license license:expat)))
+
(define-public go-github-com-chzyer-test
(package
(name "go-github-com-chzyer-test")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 06/13] gnu: Add go-github-com-felixge-fgprof
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
1dfe4d84a98bd14a3a5b0a45e1cd9576c85a4294.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-felixge-fgprof): Add variable.
---
gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index eb5379b540..ab03812125 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,33 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-felixge-fgprof
+ (package
+ (name "go-github-com-felixge-fgprof")
+ (version "0.9.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/felixge/fgprof")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03q3vnjd13r944y2qvfncs21lfkgmg0y8z14zz0xda1hz490wha3"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:tests? #f
+ #:import-path "github.com/felixge/fgprof"))
+ (propagated-inputs (list go-github-com-stretchr-testify
+ go-github-com-google-pprof))
+ (home-page "https://github.com/felixge/fgprof")
+ (synopsis "The Full Go Profiler")
+ (description
+ "Fgprof is a sampling Go profiler that allows you to analyze On-CPU as well as
+@uref{https://www.brendangregg.com/offcpuanalysis.html,Off-CPU} (e.g. I/O) time
+together.")
+ (license license:expat)))
+
(define-public go-github-com-google-pprof
(package
(name "go-github-com-google-pprof")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 05/13] gnu: Add go-github-com-google-pprof
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
1a37d90138378b438972e53c4d1bf8217a78e6fd.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-google-pprof): Add variable.
---
gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 81e2a12305..eb5379b540 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,33 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-google-pprof
+ (package
+ (name "go-github-com-google-pprof")
+ (version "0.0.0-20230728192033-2ba5b33183c6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/pprof")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c5hh0b5cqlhm888lwlf713vv572562x56dpyijs9bzjdy5y54jg"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/google/pprof"))
+ (propagated-inputs (list go-golang-org-x-sys
+ go-github-com-ianlancetaylor-demangle
+ go-github-com-chzyer-readline))
+ (home-page "https://github.com/google/pprof")
+ (synopsis
+ "PProf is a tool for visualization and analysis of profiling data")
+ (description
+ "PProf is a tool for collection, manipulation and visualization of performance
+profiles.")
+ (license license:asl2.0)))
+
(define-public go-github-com-ianlancetaylor-demangle
(package
(name "go-github-com-ianlancetaylor-demangle")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 07/13] gnu: Add go-github-com-pkg-profile
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
e7674f7e5f0ab59e0e102bf1729629c19ec6a2c3.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-pkg-profile): New variable.
---
gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ab03812125..c8bc3040d9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,37 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-pkg-profile
+ (package
+ (name "go-github-com-pkg-profile")
+ (version "1.7.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pkg/profile")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ifr9gnycjwh7dbvsb5vgs9kzlr548cb4m45zvl8i8lgd3qhppy1"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/pkg/profile"
+ #:phases #~(modify-phases %standard-phases
+ ;; profile drops a cpu.pprof file inside its source directory
+ ;; after tests which makes it unreproducible so we remove it.
+ (add-after 'check 'delete-test-file
+ (lambda* (#:key import-path #:allow-other-keys)
+ (delete-file (string-append "src/" import-path
+ "/cpu.pprof")))))))
+ (propagated-inputs (list go-github-com-felixge-fgprof))
+ (home-page "https://github.com/pkg/profile")
+ (synopsis "Simple profiling for Go")
+ (description
+ "Profile provides a simple way to manage runtime/pprof profiling of your
+Go application.")
+ (license license:bsd-2)))
+
(define-public go-github-com-felixge-fgprof
(package
(name "go-github-com-felixge-fgprof")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 09/13] gnu: Add go-github-com-dbaggerman-cuba
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
abf8e1842a58ae8218a4077fafbf33238fdf5413.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-dbaggerman-cuba): Add variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 7c981b29c3..803ff2a3b5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,32 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-dbaggerman-cuba
+ (package
+ (name "go-github-com-dbaggerman-cuba")
+ (version "0.3.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dbaggerman/cuba")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sbria32fh2bzc8agnm9p5id5z15mrqj4fyxhnkq05bh2qjkrwc7"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/dbaggerman/cuba"))
+ (propagated-inputs (list go-github-com-stretchr-testify
+ go-github-com-pkg-profile
+ go-github-com-karrick-godirwalk))
+ (home-page "https://github.com/dbaggerman/cuba")
+ (synopsis "Goroutine parallelism library")
+ (description
+ "A library for Goroutines that helps to implement more complicated
+parallel cases.")
+ (license license:expat)))
+
(define-public go-github-com-karrick-godirwalk
(package
(name "go-github-com-karrick-godirwalk")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:01
[PATCH v2 08/13] gnu: Add go-github-com-karrick-godirwalk
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
3e67c3eae8033f21b0f1d8eeebf7b0f60117b0ef.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-karrick-godirwalk): Add variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c8bc3040d9..7c981b29c3 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,28 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-karrick-godirwalk
+ (package
+ (name "go-github-com-karrick-godirwalk")
+ (version "1.17.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/karrick/godirwalk")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jyvai5vpmx86l71hg9j6lxc2b4v32ajvcmjlz40zimfb9ip11q9"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/karrick/godirwalk"))
+ (home-page "https://github.com/karrick/godirwalk")
+ (synopsis "Fast directory traversal library for Go")
+ (description
+ "This package provides functions to read and traverse directory trees.")
+ (license license:bsd-2)))
+
(define-public go-github-com-pkg-profile
(package
(name "go-github-com-pkg-profile")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:02
[PATCH v2 11/13] gnu: Add go-github-com-modern-go-reflect2
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
4ad99aa1aaa3b63f10998c3831130e4090b67f90.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-modern-go-reflect2): Add variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f38cd334a3..1eb0eae3ec 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6764,6 +6764,29 @@ (define-public go-github-com-mitchellh-reflectwalk
unknown structures such as those decoded from JSON.")
(license license:expat)))
+(define-public go-github-com-modern-go-reflect2
+ (package
+ (name "go-github-com-modern-go-reflect2")
+ (version "1.0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/modern-go/reflect2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05a89f9j4nj8v1bchfkv2sy8piz746ikj831ilbp54g8dqhl8vzr"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/modern-go/reflect2"))
+ (home-page "https://github.com/modern-go/reflect2")
+ (synopsis "Cheaper reflect API")
+ (description
+ "This library provides a reflect api for Go programs
+without the runtime cost of the standard library reflect.Value.")
+ (license license:asl2.0)))
+
(define-public go-github-com-modern-go-concurrent
(package
(name "go-github-com-modern-go-concurrent")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:02
[PATCH v2 10/13] gnu: Add go-github-com-modern-go-concurrent
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
7dae0931516bffd420ecb2a0bc88bf1f227a3d69.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-modern-go-concurrent): Add variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 803ff2a3b5..f38cd334a3 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6764,6 +6764,30 @@ (define-public go-github-com-mitchellh-reflectwalk
unknown structures such as those decoded from JSON.")
(license license:expat)))
+(define-public go-github-com-modern-go-concurrent
+ (package
+ (name "go-github-com-modern-go-concurrent")
+ (version "0.0.0-20180306012644-bacd9c7ef1dd")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/modern-go/concurrent")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0s0fxccsyb8icjmiym5k7prcqx36hvgdwl588y0491gi18k5i4zs"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/modern-go/concurrent"))
+ (home-page "https://github.com/modern-go/concurrent")
+ (synopsis "Concurrency utilities for Go")
+ (description
+ "A Go library providing various concurrency utilities including a backport
+of @code{sync.Map} to Go versions below 1.9 and a cancellable Goroutine with
+explicit ownership.")
+ (license license:asl2.0)))
+
(define-public go-github-com-mitchellh-copystructure
(package
(name "go-github-com-mitchellh-copystructure")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:02
[PATCH v2 13/13] gnu: Add scc
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
56c64b174ccbbabb85fb1895a68f81df69efe39b.1691233116.git.fries1234@protonmail.com
* gnu/packages/code.scm (scc): New variable.
---
gnu/packages/code.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 9cdda2b751..3b95bb3664 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 lu hui <luhuins@163.com>
;;; Copyright © 2021, 2022 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2023 Fries <fries1234@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages code)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system go)
#:use-module (gnu packages)
#:use-module (gnu packages autogen)
#:use-module (gnu packages autotools)
@@ -373,6 +375,39 @@ (define-public cloc
cloc can handle a greater variety of programming languages.")
(license license:gpl2+)))
+(define-public scc
+ (package
+ (name "scc")
+ (version "3.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/boyter/scc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1rkkfg6jimlc2rkajk6ypd5v0m3zai25ga5idz2pmkmzakv82n21"))))
+ (build-system go-build-system)
+ (inputs (list go-github-com-dbaggerman-cuba
+ go-github-com-json-iterator-go
+ go-github-com-mattn-go-runewidth
+ go-github-com-minio-blake2b-simd
+ go-github-com-spf13-cobra
+ go-golang-org-x-text
+ go-gopkg-in-yaml-v2))
+ (arguments
+ (list #:import-path "github.com/boyter/scc"))
+ (home-page "https://github.com/boyter/scc")
+ (synopsis "Fast code counter written in Go")
+ (description
+ "@command{scc} provides a lines-of-code counter similar to tools
+like @command{cloc} and @command{sloccount}.
+
+It aims to be fast as possible while supporting
+@acronym{COCOMO,Constructive Cost Model} calculation and code complexity estimation.")
+ (license license:expat)))
+
(define-public the-silver-searcher
(package
(name "the-silver-searcher")
--
2.41.0
F
F
Fries wrote on 5 Aug 2023 13:02
[PATCH v2 12/13] gnu: Add go-github-com-json-iterator-go
(address . 65074@debbugs.gnu.org)(name . Fries)(address . fries1234@protonmail.com)
1b95f4a754ec6999e2f302a5ede037c8875a393a.1691233116.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-json-iterator-go): Add variable.
---
gnu/packages/golang.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1eb0eae3ec..a5f3542c78 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4377,6 +4377,39 @@ (define-public go-github-com-goccy-go-json
"Fast JSON encoder/decoder compatible with encoding/json for Go.")
(license license:expat)))
+(define-public go-github-com-json-iterator-go
+ (package
+ (name "go-github-com-json-iterator-go")
+ (version "1.1.12")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/json-iterator/go")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c8f0hxm18wivx31bs615x3vxs2j3ba0v6vxchsjhldc8kl311bz"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/json-iterator/go"))
+ (propagated-inputs (list go-github-com-stretchr-testify
+ go-github-com-modern-go-reflect2
+ go-github-com-modern-go-concurrent
+ go-github-com-google-gofuzz
+ go-github-com-davecgh-go-spew))
+ (home-page "https://github.com/json-iterator/go")
+ (synopsis
+ "High-performance, 100% compatible drop-in replacement for encoding/json")
+ (description
+ "This package implements encoding and decoding of JSON as defined in
+@uref{https://rfc-editor.org/rfc/rfc4627.html,RFC 4627} and provides interfaces
+with identical syntax of standard lib encoding/json. Converting from
+encoding/json to jsoniter is no more than replacing the package with jsoniter
+and variable type declarations (if any). jsoniter interfaces gives 100%
+compatibility with code using standard lib.")
+ (license license:expat)))
+
(define-public go-github-com-getsentry-raven-go
(let ((commit "5c24d5110e0e198d9ae16f1f3465366085001d92")
(revision "0"))
--
2.41.0
(
Re: [bug#65074] [PATCH v2 13/13] gnu: Add scc
(name . Fries)(address . fries1234@protonmail.com)
871qghpux0.fsf@disroot.org
Hi,

Fries via Guix-patches via <guix-patches@gnu.org> writes:
Toggle quote (2 lines)
> * gnu/packages/code.scm (scc): New variable.

All looks good to me :)

-- (
F
F
Fries wrote on 6 Aug 2023 01:13
More cleanly merge bugs
(address . control@debbugs.gnu.org)
5713201.DvuYhMxLoT@pc
unmerge 65072
unmerge 65073
unmerge 65075
unmerge 65076
unmerge 65077
unmerge 65078
unmerge 65079
unmerge 65080
unmerge 65081
unmerge 65082
unmerge 65083
unmerge 65084
unmerge 65085
unmerge 65074
merge 65075 65074
merge 65072 65074
merge 65076 65074
merge 65073 65074
merge 65078 65074
merge 65077 65074
merge 65079 65074
merge 65082 65074
merge 65080 65074
merge 65081 65074
merge 65084 65074
merge 65085 65074
merge 65083 65074
# try to merge all the bugs with just 65074 instead of merging with all of themselves
stop
M
M
Maxim Cournoyer wrote on 1 Sep 2023 14:08
Re: bug#65085: [PATCH 12/13] gnu: Add go-github-com-json-iterator-go
(name . Fries)(address . fries1234@protonmail.com)
87wmxa3xl5.fsf_-_@gmail.com
tags 65072 + moreinfo
quit

Hi Fries,

Thank you for your contribution.

Fries <fries1234@protonmail.com> writes:

Toggle quote (34 lines)
> * gnu/packages/golang.scm (go-github-com-chyzer-test): New variable.
> ---
> gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index d99f76dc7d..ef82f0aa1b 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -2113,6 +2113,32 @@ (define-public go-github-com-dhowett-go-plist
> types.")
> (license license:giftware))))
>
> +(define-public go-github-com-chzyer-test
> + (package
> + (name "go-github-com-chzyer-test")
> + (version "1.0.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/chzyer/test")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1axdlcnx2qjsn5wsr2pr1m0w0a8k4nk5kkrngh742fgh81vzzy8s"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/chzyer/test"
> + #:phases
> + ;; Tests relating to a in-memory disk fail due to a Segfault.
> + (modify-phases %standard-phases
> + (delete 'check))))

This should be minimally investigated, and ideally an issue created on
upstream issue tracker and an URL added next to the comment to track its
resolution, e.g:

;; Tests relating to a in-memory disk fail due to a segfault (see:
;; $URL).

Also taking the comments from parens into account, could you please send
a v2 to this same issue (65072@debbugs.gnu.org) ?

--
Thanks,
Maxim
S
S
Sharlatan Hellseher wrote on 6 Apr 17:50 +0200
[PATCH 00/13] Add scc
(address . 65074-done@debbugs.gnu.org)
87wmpamqx5.fsf@gmail.com
Hi,

Thank you for the patches.

I've shift them into dedicated local golang-* modules and apply some
modifications.


- accepted-patches [13/13]
- [X] [PATCH v2 01/13] gnu: Add go-github-com-chzyer-logex
- Place to golang-xyz
- Tests disabled, upstream informed
- referred-in
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 02/13] gnu: Add go-github-com-chzyer-test
- Place to golang-check
- Add links to issues
- referred-in
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 03/13] gnu: Add go-github-com-chzyer-readline
- Place to golang-xyz
- referred-in
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 04/13] gnu: Add go-github-com-ianlancetaylor-demangle
- Place to golang-xyz
- Add issue on version tag or release
- referred-in
- [PATCH 04/13] gnu: Add go-github-com-ianlancetaylor-demangle
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 05/13] gnu: Add go-github-com-google-pprof
- Place to golang-check, Add go-pprof build, as end-user program
- Add all license, some code in third party may be unbundled when we have more Node packages
- Extend description
- Update to the latest commit
- referred-in
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 06/13] gnu: Add go-github-com-felixge-fgprof
- Place to golang-check
- Update to 0.9.4
- Enable tests
- referred-in
- [PATCH 06/13] gnu: Add go-github-com-felixge-fgprof https://issues.guix.gnu.org/65077
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 07/13] gnu: Add go-github-com-pkg-profile
- Place to golang-check
- Disable tests, issue is open https://github.com/pkg/profile/issues/68
- referred-in
- [PATCH 07/13] gnu: Add go-github-com-pkg-profile https://issues.guix.gnu.org/65079
- [PATCH 00/29] Add miller. https://issues.guix.gnu.org/66603
- [X] [PATCH v2 08/13] gnu: Add go-github-com-karrick-godirwalk
- Place to golang-xyz
- referred-in
- [PATCH 08/13] gnu: Add go-github-com-karrick-godirwalk https://issues.guix.gnu.org/65082
- [X] [PATCH v2 09/13] gnu: Add go-github-com-dbaggerman-cuba
- Place to golang-xyz
- Remove github.com/pkg/profile as it's indirect dependence
- referred-in
- [PATCH 09/13] gnu: Add go-github-com-dbaggerman-cuba https://issues.guix.gnu.org/65080
- [X] [PATCH v2 10/13] gnu: Add go-github-com-modern-go-concurrent
- Place to golang-xyz
- Use available version tag 1.0.3
- referred-in
- [PATCH 00/47] gnu: Add go-github-com-prometheus-prometheus. https://issues.guix.gnu.org/54560
- [X] [PATCH v2 11/13] gnu: Add go-github-com-modern-go-reflect2
- Place to golang-xyz
- referred-in
- [PATCH 00/47] gnu: Add go-github-com-prometheus-prometheus.
- [PATCH 11/13] gnu: Add go-github-com-modern-go-reflect2 https://issues.guix.gnu.org/65084
- [X] [PATCH v2 12/13] gnu: Add go-github-com-json-iterator-go
- referred-in
- [PATCH 12/13] gnu: Add go-github-com-json-iterator-go https://issues.guix.gnu.org/65085
- [PATCH 00/47] gnu: Add go-github-com-prometheus-prometheus. https://issues.guix.gnu.org/54560
- [X] [PATCH v2 13/13] gnu: Add scc

Pushed as c28b319640..cf4f87986a to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmYRbzYACgkQdtcnv/Ys
0rUlAg/9Ebqj1gOxK2Kf8/aTu8Z2Q91RrcmRuNdghH2K6Hr36KxZsviYv3hos2Ld
BGeNjca4Sv8nz1LLesKEmmdg5niKXxU9uE4FCs+i+SHWk2T/WX4PBxffpljMTlQz
MPiiukuxFPilYFrW2oMx97os3f6lIqHrS35Nv3DzZe/F6OneKVnORn8Ocq1tnct7
91gj4t70ez6vGC5ENnPxJ3+sryzHrnikYTyli1XfLcR4ipREAunO6/L4ibUMbjoT
qokDqCe/wuC81tacKNsBKtrG2byH3+Mv9CrsRhtU8A5aZbYtyKe7xEf+zvSxNFNl
EOk59/BzebgTHsQjVJdYa2wRuxj6mVRbHIqRoFz8icf370Y+N6q1cl2bnUpQwyrG
vgK5vtTIWmWk+lCNH01SmNyh9H+rQAB+GkP/ISbss3+qkJnyqE8FA75YUe3aUkSu
BIg+TpFGnzWkKLY8MI6QYlqX9jCvk1MVue7hEecqyPdRdDjY9+Sn7fgs8tw0Bzo3
DIbsqROZB+4lSqA3Iq9p7gCuZYJpJQrWUbKKU25ButCiHOcnOrbFIKiaUdW2RWHc
vldyFfDINqeoaacXruXYjm0UBOMMB+aFIt1ZuQ0LoRbwKezHxroaH3ipKvuJL8Oa
GXgJSUocXb7k08JVleltyzYvkFNnaYe8rPqG74APrQPlopQ9s0M=
=YFp/
-----END PGP SIGNATURE-----

Closed
?