GNU bug report logs -
#65204
[PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher.
Previous Next
Reported by: Hilton Chain <hako <at> ultrarare.space>
Date: Thu, 10 Aug 2023 11:42:02 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65204 in the body.
You can then email your comments to 65204 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Hilton Chain <hako <at> ultrarare.space>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 10 Aug 2023 11:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello Guix!
I learned about there're pre-generated files in
go-github-com-tdewolff-parse-v2 and go-github-com-tdewolff-minify-v2 when
looking through #61946.
So this patchset adds go-github-com-tdewolff-hasher, which is the generator,
and uses it to generate relevant files for those two packages.
Thanks
Hilton Chain (6):
gnu: Add go-github-com-dgryski-go-metro.
gnu: Add go-github-com-dgryski-go-mph.
gnu: Add go-github-com-cespare-mph.
gnu: Add go-github-com-tdewolff-hasher.
gnu: go-github-com-tdewolff-parse-v2: Regenerate hash.
gnu: go-github-com-tdewolff-minify-v2: Regenerate hash.
gnu/packages/golang.scm | 131 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 4 deletions(-)
base-commit: 90e34d25d5e7c14b7f3293a78f3cdad676c0d035
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:44:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 65204 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/golang.scm (go-github-com-dgryski-go-metro): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ea6aadbe80..88c77db5f8 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5246,6 +5246,30 @@ (define-public go-github-com-ayufan-golang-kardianos-service
SysVinit, and more.")
(license license:zlib))))
+(define-public go-github-com-dgryski-go-metro
+ (package
+ (name "go-github-com-dgryski-go-metro")
+ (version "0.0.0-20211217172704-adc40b04c140")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dgryski/go-metro")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16y5vc5qf7aipi8basqza8l939hlmp7wqsv4y6gsqac3sp9ziqyj"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/dgryski/go-metro"))
+ (home-page "https://github.com/dgryski/go-metro")
+ (synopsis "Go translation of MetroHash")
+ (description
+ "This package provides a Go translation of the
+@url{https://github.com/jandrewrogers/MetroHash, reference C++ code for
+MetroHash}, a high quality, high performance hash algorithm.")
+ (license license:expat)))
+
(define-public go-github-com-docker-distribution
(let ((commit "325b0804fef3a66309d962357aac3c2ce3f4d329")
(revision "0"))
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:44:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 65204 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/golang.scm (go-github-com-dgryski-go-mph): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 88c77db5f8..016695239e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5270,6 +5270,30 @@ (define-public go-github-com-dgryski-go-metro
MetroHash}, a high quality, high performance hash algorithm.")
(license license:expat)))
+(define-public go-github-com-dgryski-go-mph
+ (package
+ (name "go-github-com-dgryski-go-mph")
+ (version "0.0.0-20211217222804-81a8625fb7ed")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dgryski/go-mph")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "10q8l4jdzqf54bnnxka2jk6qzayri3ijv51knn1n0iimfric8w9g"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/dgryski/go-mph"))
+ (propagated-inputs
+ (list go-github-com-dgryski-go-metro))
+ (home-page "https://github.com/dgryski/go-mph")
+ (synopsis "Go minimal perfect hash function")
+ (description
+ "This package implements a hash/displace minimal perfect hash function.")
+ (license license:expat)))
+
(define-public go-github-com-docker-distribution
(let ((commit "325b0804fef3a66309d962357aac3c2ce3f4d329")
(revision "0"))
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:44:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 65204 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/golang.scm (go-github-com-cespare-mph): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 016695239e..b84e4c7ba7 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7324,6 +7324,29 @@ (define-public go-github-com-cention-sany-utf7
encoding in Go.")
(license license:bsd-3)))
+(define-public go-github-com-cespare-mph
+ (package
+ (name "go-github-com-cespare-mph")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cespare/mph")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mvd6bkvf3i3555kqkkr3k9jd4c25scjq4xad35sxpny8f72nbg1"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/cespare/mph"))
+ (home-page "https://github.com/cespare/mph")
+ (synopsis "Minimal perfect hashing in Go")
+ (description
+ "@code{mph} is a Go package that implements a minimal perfect hash table
+over strings.")
+ (license license:expat)))
+
(define-public go-github-com-gdamore-tcell
(let ((commit "aaadc574a6ed8dc3abe56036ca130dcee1ee6b6e")
(version "1.1.2")
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:44:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 65204 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/golang.scm (go-github-com-tdewolff-hasher): 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 b84e4c7ba7..21562a135f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3403,6 +3403,32 @@ (define-public go-github-com-saracen-walker
(description "The @code{walker} function is a faster, parallel version, of
@code{filepath.Walk}")))
+(define-public go-github-com-tdewolff-hasher
+ (package
+ (name "go-github-com-tdewolff-hasher")
+ (version "0.0.0-20210521220142-bc97f602bca2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tdewolff/hasher")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12dmxpmdy2z7c2z7qv2mv2aq4hyvjncb6fzr0ymg3y5bfjvl4dcw"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/tdewolff/hasher"))
+ (native-inputs
+ (list go-github-com-cespare-mph
+ go-github-com-dgryski-go-mph))
+ (home-page "https://github.com/tdewolff/hasher")
+ (synopsis "Go known-keys fast-lookup map generator")
+ (description
+ "Hasher is a tool to automate the creation of methods and tables for a
+@code{string} to @code{uint32} mapper.")
+ (license license:bsd-3)))
+
(define-public go-github-com-tdewolff-minify-v2
(package
(name "go-github-com-tdewolff-minify-v2")
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:45:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 65204 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2)[#:phases]: Add
phase 'regenerate-hash.
[native-inputs]: Add go-github-com-tdewolff-hasher.
---
gnu/packages/golang.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 21562a135f..4360fccc0a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3471,9 +3471,22 @@ (define-public go-github-com-tdewolff-parse-v2
"1dqki9ima079k9a3l72igmx5dml8qsl9z8rzw8a433f4gjhlv320"))))
(build-system go-build-system)
(arguments
- (list #:import-path "github.com/tdewolff/parse/v2"))
+ (list #:import-path "github.com/tdewolff/parse/v2"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'regenerate-hash
+ (lambda* (#:key import-path #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (with-directory-excursion
+ (format #f "src/~a/~a" import-path dir)
+ (make-file-writable "hash.go")
+ (format #t "Generating `hash.go' for ~a...~%" dir)
+ (invoke "go" "generate")))
+ '("css" "html")))))))
(native-inputs
- (list go-github-com-tdewolff-test))
+ (list go-github-com-tdewolff-hasher
+ go-github-com-tdewolff-test))
(home-page "https://github.com/tdewolff/parse")
(synopsis "Go parsers for web formats")
(description
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Thu, 10 Aug 2023 11:45:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 65204 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/golang.scm (go-github-com-tdewolff-minify-v2)[#:phases]: Add
phase 'regenerate-hash.
[native-inputs]: Add go-github-com-tdewolff-hasher.
---
gnu/packages/golang.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 4360fccc0a..0cac1e0149 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3444,11 +3444,24 @@ (define-public go-github-com-tdewolff-minify-v2
"0h006wpfkl0ls0skqxblwcanrhmphgq5q0ii26l2ayh7s99cgmy3"))))
(build-system go-build-system)
(arguments
- (list #:import-path "github.com/tdewolff/minify/v2"))
+ (list #:import-path "github.com/tdewolff/minify/v2"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'regenerate-hash
+ (lambda* (#:key import-path #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (with-directory-excursion
+ (format #f "src/~a/~a" import-path dir)
+ (make-file-writable "hash.go")
+ (format #t "Generating `hash.go' for ~a...~%" dir)
+ (invoke "go" "generate")))
+ '("css" "html" "svg")))))))
(propagated-inputs
(list go-github-com-tdewolff-parse-v2))
(native-inputs
- (list go-github-com-tdewolff-test))
+ (list go-github-com-tdewolff-hasher
+ go-github-com-tdewolff-test))
(home-page "https://go.tacodewolff.nl/minify")
(synopsis "Go minifiers for web formats")
(description
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Mon, 21 Aug 2023 14:04:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 65204 <at> debbugs.gnu.org (full text, mbox):
Hi,
Hilton Chain <hako <at> ultrarare.space> skribis:
> * gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2)[#:phases]: Add
> phase 'regenerate-hash.
> [native-inputs]: Add go-github-com-tdewolff-hasher.
[...]
> + (list #:import-path "github.com/tdewolff/parse/v2"
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'regenerate-hash
> + (lambda* (#:key import-path #:allow-other-keys)
> + (for-each
> + (lambda (dir)
> + (with-directory-excursion
> + (format #f "src/~a/~a" import-path dir)
> + (make-file-writable "hash.go")
> + (format #t "Generating `hash.go' for ~a...~%" dir)
> + (invoke "go" "generate")))
Maybe you can remove ‘hash.go’ in a snippet, for good measure, and add a
comment clarifying that it’s a generated file.
Otherwise the patch series LGTM!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65204
; Package
guix-patches
.
(Mon, 21 Aug 2023 15:22:03 GMT)
Full text and
rfc822 format available.
Message #29 received at 65204 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
On Mon, 21 Aug 2023 22:03:27 +0800,
Ludovic Courtès wrote:
>
> > * gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2)[#:phases]: Add
> > phase 'regenerate-hash.
> > [native-inputs]: Add go-github-com-tdewolff-hasher.
>
> [...]
>
> > + (list #:import-path "github.com/tdewolff/parse/v2"
> > + #:phases
> > + #~(modify-phases %standard-phases
> > + (add-after 'unpack 'regenerate-hash
> > + (lambda* (#:key import-path #:allow-other-keys)
> > + (for-each
> > + (lambda (dir)
> > + (with-directory-excursion
> > + (format #f "src/~a/~a" import-path dir)
> > + (make-file-writable "hash.go")
> > + (format #t "Generating `hash.go' for ~a...~%" dir)
> > + (invoke "go" "generate")))
>
> Maybe you can remove ‘hash.go’ in a snippet, for good measure, and add a
> comment clarifying that it’s a generated file.
>
> Otherwise the patch series LGTM!
Source data to generate the hash is also written in `hash.go', so it's
not possible to remove it.
Thanks
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Wed, 06 Sep 2023 05:30:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Hilton Chain <hako <at> ultrarare.space>
:
bug acknowledged by developer.
(Wed, 06 Sep 2023 05:30:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 65204-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Hilton Chain <hako <at> ultrarare.space> writes:
> Hello Guix!
>
> I learned about there're pre-generated files in
> go-github-com-tdewolff-parse-v2 and go-github-com-tdewolff-minify-v2 when
> looking through #61946.
>
> So this patchset adds go-github-com-tdewolff-hasher, which is the generator,
> and uses it to generate relevant files for those two packages.
Great! Installed.
--
Thanks,
Maxim
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 04 Oct 2023 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.