From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, pelzflorian@pelzflorian.de, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 06 Oct 2024 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73660@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.17282293861124 (code B ref -1); Sun, 06 Oct 2024 15:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Oct 2024 15:43:06 +0000 Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxTPV-0000I2-DC for submit@debbugs.gnu.org; Sun, 06 Oct 2024 11:43:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:37454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sxTPR-0000HP-PR for submit@debbugs.gnu.org; Sun, 06 Oct 2024 11:43:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sxTPL-00060P-CT for guix-patches@gnu.org; Sun, 06 Oct 2024 11:42:55 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sxTPI-00021n-PL for guix-patches@gnu.org; Sun, 06 Oct 2024 11:42:55 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 5B6FA31EFF6; Sun, 6 Oct 2024 15:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1728229370; bh=ZBRaB9MJIRKXeghlOajWnO1m7Ic2O5xdKKnrOZEl82o=; h=From:To:Cc:Subject:Date; b=pxMmK+ci/oq0O5IPT1Kugz/stNfI33uhC/FXYlBV5JEZWMM7g4MRbLeD9QMBwmsBG nLP6bdeS2WD5YlabEDLgV/mMRxDIVoKgANcAroK+BtAMq5pOUf4vNZXcLtNfBskg8V aBPP95JdxMQEvdxpDvsUVEBd7HfHWYR8a8G5XU9lf1pHitVu+1A2yXXbUZ94pKVCXt vKMschrBc4oxw0Br+MQGE72pwDtyXB6aZ0q4fZOwLKZvZYrFidnjccohMfbaz3KY4O 9nzsoQb5ElQ4moOsRVL221XqrEaId5Gc+ySyb/9GTn4e0oy2oFdEj2srbrJLAH5Hn9 UPt1oBP3m4pqtYVBJw65em8jwupCjxK9ok9NfxCC/M0rQImrUi6ojm1PEln7kte4BL kS2gAhSnDaL7Ix2X1HhQ8nvJGRy2kJyF0qqhWXrPpZ0djFgxhWfw82Bk9BtHbAXn0U UCZ5179pjqKoZ/NEA8aK5MiH0J5UxIAhdaGfd+LkvokuDvqZpL36PExUN9Wr3qKXj3 oMTC6VsYdviJUvd8VqMHKIx7xitugQnGVnd+soI8rcnSCmxgy1O2WCHjH52YKwlsRx XRmBZVD4IN1thu9c/ICuYy6SHxvx9aHVQ3ZrpsjVVBgjZ9oU0HrleOGPnB93eNHrOT kg4J3K5U9MUkl/5PL3Ykl4Gw= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [146.70.134.132]) by wolfsden.cz (Postfix) with ESMTPSA id 8964A320A72; Sun, 6 Oct 2024 15:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1728229369; bh=ZBRaB9MJIRKXeghlOajWnO1m7Ic2O5xdKKnrOZEl82o=; h=From:To:Cc:Subject:Date; b=WCbiWurtPUZ5dm+2+5Fre9w34Vz5uoQowSTSO60nyHEGfykoT3x3yGt1keZoZo4ze omc/s7EwPV5aUZARxn9xOIb4AK5iBQ6+62o3gadUKdyZMKhq4NRJh6ufDM9BmEeDF/ faFr9mjat9OObOqEJ768Fa/PFkIyulMVx+w0KO49H6vJRVcxZaj0g2wsQ1PU+Mj8gg G9rQA5RpTPNAzEdcXmqGxJCKuDeFeGjRfY/pxkOq6PzufjMkU/KIzn5cypo4gCREbI kyl969x/thG26O6sB+LkwWGiw9gD6p2IiYR5a012hyM6xnQH9HvhLFswFz1Kqnd3dO F5BQ3OdUmBmEGcf/wcicAOG757B4bs0KJpAif22WnvtYtmANek6aCMCpUskuK/+uf4 lLqNA83X76i+GrUW1QBPlBQcOlmdpokNqYbTIe22cxr2sYc8g58UMYa71D44HGDmBs KbstWIwvli7Y6L3pbt95qDbEYh2ZjFwBY+pXZ3aBhT32olLq0Ahq8CFeE2PrMEIXJM WrLVH7ZnVptd7T6BRWRcYEl0X3/Lu/72k1SBQj+0SigGWaJ1cMxszvPuT6iJlwtgS3 Dj8e8Lq3qIgZMwzzW9r+N2FtChf2kRlJCe6dKOhUoeqGrc83wgcmPbRVzThXN1PQOl hUgHXqt4yR+IDC0O9BlOVF68= From: Tomas Volf <~@wolfsden.cz> Date: Sun, 6 Oct 2024 17:42:26 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Support for non-ASCII characters was mixed. Some gexp forms did support them, while others did not. Combined with current value for %default-port-conversion-strategy, that sometimes led to unpleasant surprises. For example: (scheme-file "utf8" #~(with-output-to-file #$output (λ _ (display "猫")))) Was written to the store as: ((? _ (display "\u732b"))) No, that is not font issue on your part, that is an actual #\? instead of the lambda character. Which, surprisingly, does not do what it should when executed. The solution is to switch to C.UTF-8 locale where possible, since it is now always available. Or to explicitly set the port encoding. No tests are provided, since majority of tests/gexp.scm use guile in version 2, and it tends to work under it. The issues occur mostly with guile 3. I did test it locally using: #!/bin/sh set -eu set -x [ -f guix.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; } [ -f gnu.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; } cat >猫.scm <<'EOF' (define-module (猫) #:export (say)) (define (say) "nyaaaa~~~~!") EOF mkdir -p dir-with-utf8-file cp 猫.scm dir-with-utf8-file/ cat >repro.scm <<'EOF' (use-modules (guix build utils) (guix derivations) (guix gexp) (guix store) (ice-9 ftw) (ice-9 textual-ports)) (define cat "猫") (define (drv-content drv) (call-with-input-file (derivation->output-path drv) get-string-all)) (define (out-content out) (call-with-input-file out get-string-all)) (define (drv-listing drv) (scandir (derivation->output-path drv))) (define (dir-listing dir) (scandir dir)) (define-macro (test exp lower? report) (let ((type (car exp))) `(false-if-exception (let ((drv (with-store %store (run-with-store %store (,(if lower? lower-object identity) ,exp))))) (format #t "~%~a:~%" ',type) (when (with-store %store (build-derivations %store (list drv))) (format #t "~a~%" (,report drv))))))) (test (computed-file "utf8" #~(with-output-to-file #$output (λ _ (display #$cat)))) #t drv-content) (test (program-file "utf8" #~((λ _ (display #$cat)))) #t drv-content) (test (scheme-file "utf8" #~((λ _ (display #$cat)))) #t drv-content) (test (text-file* "utf8" cat cat cat) #f drv-content) (test (compiled-modules '((猫))) #f drv-listing) (test (file-union "utf8" `((,cat ,(plain-file "utf8" cat)))) #t drv-listing) ;;; No fix needed: (test (imported-modules '((猫))) #f dir-listing) (test (local-file "dir-with-utf8-file" #:recursive? #t) #t dir-listing) (test (plain-file "utf8" cat) #t out-content) (test (mixed-text-file "utf8" cat cat cat) #t drv-content) (test (directory-union "utf8" (list (local-file "dir-with-utf8-file" #:recursive? #t))) #t dir-listing) EOF guix shell -CWN -D guix glibc-locales -- \ env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm Before this commit, the output is: + '[' -f guix.scm ']' + '[' -f gnu.scm ']' + cat + mkdir -p dir-with-utf8-file + cp 猫.scm dir-with-utf8-file/ + cat + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm computed-file: ? program-file: #!/gnu/store/mfkz7fvlfpv3ppwbkv0imb19nrf95akf-guile-3.0.9/bin/guile --no-auto-compile !# ((? _ (display "\u732b"))) scheme-file: ((? _ (display "\u732b"))) text-file*: ??? compiled-modules: building path(s) `/gnu/store/ay3jifyvliigfgnz67jf0kgngzpya5a5-module-import-compiled' Backtrace: 5 (primitive-load "/gnu/store/rn7b0dq6iqfmmqyqzamix2mjmfy?") In ice-9/eval.scm: 619:8 4 (_ #f) In srfi/srfi-1.scm: 460:18 3 (fold # ?) In ice-9/eval.scm: 245:16 2 (_ #(#(#) # ?)) In ice-9/boot-9.scm: 1982:24 1 (_ _) In unknown file: 0 (stat "./???.scm" #) ERROR: In procedure stat: In procedure stat: No such file or directory: "./???.scm" builder for `/gnu/store/dxg87135zcd6a1c92dlrkyvxlbhfwfld-module-import-compiled.drv' failed with exit code 1 file-union: (. .. ?) imported-modules: (. .. 猫.scm) local-file: (. .. 猫.scm) plain-file: 猫 mixed-text-file: 猫猫猫 directory-union: (. .. 猫.scm) Which I think you will agree is far from optimal. After my fix the output changes to: + '[' -f guix.scm ']' + '[' -f gnu.scm ']' + cat + mkdir -p dir-with-utf8-file + cp 猫.scm dir-with-utf8-file/ + cat + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm computed-file: 猫 program-file: #!/gnu/store/8kbmn359jqkgsbqgqxnmiryvd9ynz8w7-guile-3.0.9/bin/guile --no-auto-compile !# ((λ _ (display "猫"))) scheme-file: ((λ _ (display "猫"))) text-file*: 猫猫猫 compiled-modules: (. .. 猫.go) file-union: (. .. 猫) imported-modules: (. .. 猫.scm) local-file: (. .. 猫.scm) plain-file: 猫 mixed-text-file: 猫猫猫 directory-union: (. .. 猫.scm) Which is actually what the user would expect. I also added missing arguments to the documentation. * guix/gexp.scm (computed-file): Set LANG to C.UTF-8 by default. (compiled-modules): Try to `setlocale'. (gexp->script), (gexp->file): New `locale' argument defaulting to C.UTF-8. (text-file*): Set output port encoding to UTF-8. * doc/guix.texi (G-Expressions)[computed-file]: Document the changes. Use @var. Document #:guile. [gexp->script]: Document #:locale. Fix default value for #:target. [gexp->file]: Document #:locale, #:system and #:target. Change-Id: Ib323b51af88a588b780ff48ddd04db8be7c729fb --- doc/guix.texi | 11 +++++++---- guix/gexp.scm | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 52e36e4354..683ba2f44b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12270,7 +12270,9 @@ G-Expressions This is the declarative counterpart of @code{text-file}. @end deffn -@deffn {Procedure} computed-file name gexp [#:local-build? #t] [#:options '()] +@deffn {Procedure} computed-file @var{name} @var{gexp} @ + [#:local-build? #t] [#:guile] @ + [#:options '(#:env-vars (("LANG" . "C.UTF-8")))] Return an object representing the store item @var{name}, a file or directory computed by @var{gexp}. When @var{local-build?} is true (the default), the derivation is built locally. @var{options} is a list of @@ -12281,7 +12283,7 @@ G-Expressions @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} @ [#:guile (default-guile)] [#:module-path %load-path] @ - [#:system (%current-system)] [#:target #f] + [#:system (%current-system)] [#:target 'current] [#:locale "C.UTF-8"] Return an executable script @var{name} that runs @var{exp} using @var{guile}, with @var{exp}'s imported modules in its search path. Look up @var{exp}'s modules in @var{module-path}. @@ -12318,8 +12320,9 @@ G-Expressions @deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @ [#:set-load-path? #t] [#:module-path %load-path] @ - [#:splice? #f] @ - [#:guile (default-guile)] + [#:splice? #f] [#:guile (default-guile)] @ + [#:system (%current-system)] [#:target 'current] @ + [#:locale "C.UTF-8"] Return a derivation that builds a file @var{name} containing @var{exp}. When @var{splice?} is true, @var{exp} is considered to be a list of expressions that will be spliced in the resulting file. diff --git a/guix/gexp.scm b/guix/gexp.scm index e44aea6420..c8aba91779 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -597,7 +597,10 @@ (define-record-type (options computed-file-options)) ;list of arguments (define* (computed-file name gexp - #:key guile (local-build? #t) (options '())) + #:key + guile + (local-build? #t) + (options '(#:env-vars (("LANG" . "C.UTF-8"))))) "Return an object representing the store item NAME, a file or directory computed by GEXP. When LOCAL-BUILD? is #t (the default), it ensures the corresponding derivation is built locally. OPTIONS may be used to pass @@ -1700,6 +1703,9 @@ (define* (compiled-modules modules (system base target) (system base compile)) + ;; Best effort. The locale is not installed in all contexts. + (false-if-exception (setlocale LC_ALL "C.UTF-8")) + (define modules (getenv "modules")) @@ -1990,7 +1996,8 @@ (define* (gexp->script name exp #:key (guile (default-guile)) (module-path %load-path) (system (%current-system)) - (target 'current)) + (target 'current) + (locale "C.UTF-8")) "Return an executable script NAME that runs EXP using GUILE, with EXP's imported modules in its search path. Look up EXP's modules in MODULE-PATH." (mlet* %store-monad ((target (if (eq? target 'current) @@ -2033,7 +2040,8 @@ (define* (gexp->script name exp ;; These derivations are not worth offloading or ;; substituting. #:local-build? #t - #:substitutable? #f))) + #:substitutable? #f + #:env-vars `(("LANG" . ,locale))))) (define* (gexp->file name exp #:key (guile (default-guile)) @@ -2041,7 +2049,8 @@ (define* (gexp->file name exp #:key (module-path %load-path) (splice? #f) (system (%current-system)) - (target 'current)) + (target 'current) + (locale "C.UTF-8")) "Return a derivation that builds a file NAME containing EXP. When SPLICE? is true, EXP is considered to be a list of expressions that will be spliced in the resulting file. @@ -2081,7 +2090,8 @@ (define* (gexp->file name exp #:key #:local-build? #t #:substitutable? #f #:system system - #:target target) + #:target target + #:env-vars `(("LANG" . ,locale))) (gexp->derivation name (gexp (call-with-output-file (ungexp output) @@ -2098,7 +2108,8 @@ (define* (gexp->file name exp #:key #:local-build? #t #:substitutable? #f #:system system - #:target target)))) + #:target target + #:env-vars `(("LANG" . ,locale)))))) (define* (text-file* name #:rest text) "Return as a monadic value a derivation that builds a text file containing @@ -2108,6 +2119,7 @@ (define* (text-file* name #:rest text) (define builder (gexp (call-with-output-file (ungexp output "out") (lambda (port) + (set-port-encoding! port "UTF-8") (display (string-append (ungexp-splicing text)) port))))) (gexp->derivation name builder -- 2.46.0 From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Oct 2024 00:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73660@debbugs.gnu.org Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.1729642448941 (code B ref 73660); Wed, 23 Oct 2024 00:15:02 +0000 Received: (at 73660) by debbugs.gnu.org; 23 Oct 2024 00:14:08 +0000 Received: from localhost ([127.0.0.1]:58049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3P0q-0000F6-Eh for submit@debbugs.gnu.org; Tue, 22 Oct 2024 20:14:08 -0400 Received: from wolfsden.cz ([37.205.8.62]:47208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1t3P0n-0000Ew-83 for 73660@debbugs.gnu.org; Tue, 22 Oct 2024 20:14:06 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9F234310A0A; Wed, 23 Oct 2024 00:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1729642415; bh=oFoktkh5htHFxbPNSZ0+grRJSNXJtW27uzYoMdkmhQU=; h=From:To:Subject:In-Reply-To:References:Date; b=aOp63xM6ntavxfMQmbQjqwRZICPdKS+N+087OL0kGmk9EVwlmXeTQVTh7AEG0hGXj JEfs9nD4QbDHPH7HC1kF/Gx4Wgi9RLNYR9yXQcdmpcoumGJUU1YwzCMMj2qvVoxAZy Yx+LFwjOD0w/EoIUhlN2H+RW8oFHWoLCZ/8LafMbKJ+pwM6NHKgRT4POzBJxtWoWLh OoEcHXUZ2Ne/qqW91MEWjTs5/KXzVvReihec+a809yxhQBgdjE9uTnO//rCffQLSK9 u/gXppW9axtJ+6yIGuGsKXTXaCS8ahqvPoPVxFTJLHsoWmSpB8vlSBGYsZt35NkJDl gqcBDC/HLkRkPgByMOEU9p/PACtZSFnqjYmKB2DXT1IiKULYdsdOKRrm3hnGwLM2jx W5s0pYiQDl8ub4Q2NLIr+gIVga/Xda9uOLu6wzEWxS5KoRtG+MlXr9lrIc5puExX5E ICDlOk2aOz6NRM2GGyJkHdgf5Mw4E+JPymCtCJDkBLNPUCoNKxmCKodkLwdgw1c8Bt M4lfnmkOPjJjhFYt6dC3hPu3RcxINTmBMLzgbf+JKSfHz1JS7wS3a/JwVWHSeRo774 EjRsjTQ8OHwbV5YVGhazhTXaACcu057Us41MExTvIuMxyFm2TcLLsI5mrfKzY0IYFk Uon1T2oA3bfJ/FJAPuLqWFzo= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 531DB311099 for <73660@debbugs.gnu.org>; Wed, 23 Oct 2024 00:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1729642415; bh=oFoktkh5htHFxbPNSZ0+grRJSNXJtW27uzYoMdkmhQU=; h=From:To:Subject:In-Reply-To:References:Date; b=aOp63xM6ntavxfMQmbQjqwRZICPdKS+N+087OL0kGmk9EVwlmXeTQVTh7AEG0hGXj JEfs9nD4QbDHPH7HC1kF/Gx4Wgi9RLNYR9yXQcdmpcoumGJUU1YwzCMMj2qvVoxAZy Yx+LFwjOD0w/EoIUhlN2H+RW8oFHWoLCZ/8LafMbKJ+pwM6NHKgRT4POzBJxtWoWLh OoEcHXUZ2Ne/qqW91MEWjTs5/KXzVvReihec+a809yxhQBgdjE9uTnO//rCffQLSK9 u/gXppW9axtJ+6yIGuGsKXTXaCS8ahqvPoPVxFTJLHsoWmSpB8vlSBGYsZt35NkJDl gqcBDC/HLkRkPgByMOEU9p/PACtZSFnqjYmKB2DXT1IiKULYdsdOKRrm3hnGwLM2jx W5s0pYiQDl8ub4Q2NLIr+gIVga/Xda9uOLu6wzEWxS5KoRtG+MlXr9lrIc5puExX5E ICDlOk2aOz6NRM2GGyJkHdgf5Mw4E+JPymCtCJDkBLNPUCoNKxmCKodkLwdgw1c8Bt M4lfnmkOPjJjhFYt6dC3hPu3RcxINTmBMLzgbf+JKSfHz1JS7wS3a/JwVWHSeRo774 EjRsjTQ8OHwbV5YVGhazhTXaACcu057Us41MExTvIuMxyFm2TcLLsI5mrfKzY0IYFk Uon1T2oA3bfJ/FJAPuLqWFzo= From: Tomas Volf <~@wolfsden.cz> In-Reply-To: (Tomas Volf's message of "Sun, 6 Oct 2024 17:42:26 +0200") References: Date: Wed, 23 Oct 2024 02:13:33 +0200 Message-ID: <87ttd365hu.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, any opinion regarding this patch? I think it prevents whole class of annoying bugs, and some forms already had support for it, this just extend it to all forms. Have a nice day, Tomas From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Jan 2025 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: 73660@debbugs.gnu.org Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17365248256243 (code B ref 73660); Fri, 10 Jan 2025 16:01:02 +0000 Received: (at 73660) by debbugs.gnu.org; 10 Jan 2025 16:00:25 +0000 Received: from localhost ([127.0.0.1]:58472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWHQv-0001cc-6B for submit@debbugs.gnu.org; Fri, 10 Jan 2025 11:00:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54008) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWHQs-0001cO-BX for 73660@debbugs.gnu.org; Fri, 10 Jan 2025 11:00:23 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tWHQl-00045q-CF; Fri, 10 Jan 2025 11:00:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Xkiy+BDmiElIWSltqJ3HO+tC/J77MwMqKWSzbiqfC4I=; b=E/iWXC9ZIAcnOBkdH+ot qtuFnXJmKLVHsjvF4jFswDw7sCDx2zvycxAYZqMGP52743xXQfN90O97Xv61SVS4l0dU1iB5fGjzs CXmQt1b6JR50/mOmiK8xDaoiK01rCG2y91WjAhvv0F3BrZmKbjv7ZdLPAPJ5eYidTk3O6NvFsJHtu 0DE90aB8lyBMvNXgKjmncNaiziJ4SwJCwUFsZhs+izaUtSP86/Psv+j35M8ELrIX6Weo9EAsHwiMu Vzbkc2xAFWACRpO96ggoDFrTaOOixlf+nchxXNn9P6PsZfrxcL5VHgnaZ4SfM9tSrn84v9FT8gaF5 BBoT5yRdv2AhWg==; From: Janneke Nieuwenhuizen In-Reply-To: <87ttd365hu.fsf@wolfsden.cz> (Tomas Volf's message of "Wed, 23 Oct 2024 02:13:33 +0200") References: <87ttd365hu.fsf@wolfsden.cz> Date: Fri, 10 Jan 2025 17:00:00 +0100 Message-ID: <87v7ummzgf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tomas Volf writes: Hi, > any opinion regarding this patch? I think it prevents whole class of > annoying bugs, and some forms already had support for it, this just > extend it to all forms. While I don't feel qualified to LGTM this patch, it makes sense to me. As discussed on IRC I added the patch to core-packages-team, but also reverted it to avoid a world rebuild. Just now I pushed a newlyrebased core-packages-team with the patch in action, see . Would you like to also keep an eye out for how that works? Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jan 2025 00:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Janneke Nieuwenhuizen Cc: 73660@debbugs.gnu.org Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17365561715403 (code B ref 73660); Sat, 11 Jan 2025 00:43:01 +0000 Received: (at 73660) by debbugs.gnu.org; 11 Jan 2025 00:42:51 +0000 Received: from localhost ([127.0.0.1]:40263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWPaU-0001P4-IX for submit@debbugs.gnu.org; Fri, 10 Jan 2025 19:42:50 -0500 Received: from wolfsden.cz ([37.205.8.62]:42376) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tWPaQ-0001Os-Jt for 73660@debbugs.gnu.org; Fri, 10 Jan 2025 19:42:48 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 9369831987F; Sat, 11 Jan 2025 00:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1736556165; bh=+ZYHKn55qRcAkT+U3OoZ54Bh9svNP6pPlKNLijeuUw4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=gtmdM+6tHaj/sl44XXKqsZPzhYeZufbWzN4FaAG3QEmq6bwHW6GJOWJNHITZXSEgL Jh5K6Mnzih37jobGuAnR6aRcL184HKRkI1GPw/XO+8G7UBf6Pm9EUKXagV8ncq1UbH wnVin/dDpxBF99VMvRBJLZlfitq96O6CTlWoI0mYpohx4OxG98dwCz77LZ5PimMK8U ai0lpYSnCi79Ulo9qTr2IWGyIYXHVZ1FNa3KepLtTeDX3p+cB/eQSPoPVw+eyMerBa AkfwuWwwsb3XxZuYMkSCNxH4d5s1sXHk+1/UvHaCGMoL2vPUsY23vZGBAqHPT4tjuU rg+7mgXFgPV1SF6nVqD+cWEjLEgenu9YSEd9kJ8Wp1fv0XBEYMC6qElUbESUXJqMIA OyluQYbpg4HRHuXQ0fklxGPcSUi5pn7Jcc6g4ACXNJsyCKqan3rmLnj9S2jZlKapBA AJp2/pEmI9Kki56xUTlGSTXlvMhVJUsi8HSRoNAGM144Jj4zh75bEBu1GLN/ROGN2h J/56oZiUQ1If5YvXUUqkXpCjVRZFKcKi8HWmHay2ZS2u3wBEBiMplU0pw7SnNTnWST ApHCIfJUHLAeHC1m6Biv9E1YIKnxXXmYhyAllhsGhM7vJzP0Z+0U7OXb8u4f3cKlKp hsgq4zAqlHmf1G+WcxqoOQq8= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 7BDC831A0A7; Sat, 11 Jan 2025 00:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1736556164; bh=+ZYHKn55qRcAkT+U3OoZ54Bh9svNP6pPlKNLijeuUw4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=nBJz+KYwAdtCRy6IxxGBVPo6kYNmDIWbQrtAijYA0p68wjbwMkQJMF8+Kcc0ChglP wZR4pD891BN/onw4z9lXf1gWc7kosN8ZjNSw4rFsbFOoH2xfYx5EkenMnxk7Jy2nDH KdkpJkwAc+qPJrxLeBoN4hBHYdoPV7Y8ov2S0ok5xndaW1uMa+LNyYHu4Ol5VrAb0S S8Sd3CUidI58he5EHXaiWDFlfHCF3FRy6pI6OLm8AGDH2N+vz4q85uwonrwqIfMvxV ea/BTBR/Jgx3EWGWMO8xH1JZvDxeUgtXnpCyq7FRpWVqpR/Cj2AwJYC7X+ipSt/A2g 8JgOwssy4LYTD14464mV6g/CBqGM2t06OVp0OPkVtm3Izm/K0sfUzpVDjo4sTbSwtL pqKxu5Rpeur05QsxIOmYe+MQnWlOvVjFGACHD7bYS7Uysx97npj0gRReWHwSTmrEW8 2vpRImSaXSb9aR38a+b77sCMtU9oz7wia7l1RAkbhsdtJ/AIWW989vfto9qieLCzP3 MsIRSjqt6CRdlkutHkFfXwHTo9lkZ/9id+OuB3hi5AYTOgf9vqA1YCxFcHJamQmbtI iWl5ZWPLywxVmegKLRikYrUo6JK4FTskaNlQZvH8yyLpWLdHh9PQ5Fa6tSlf92E2Yp 3Qc4fjXi4REj3hfR7OJU3JuQ= From: Tomas Volf <~@wolfsden.cz> In-Reply-To: <87v7ummzgf.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Fri, 10 Jan 2025 17:00:00 +0100") References: <87ttd365hu.fsf@wolfsden.cz> <87v7ummzgf.fsf@gnu.org> Date: Sat, 11 Jan 2025 01:42:43 +0100 Message-ID: <87ikqmp4e4.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Janneke Nieuwenhuizen writes: > Tomas Volf writes: > > Hi, > >> any opinion regarding this patch? I think it prevents whole class of >> annoying bugs, and some forms already had support for it, this just >> extend it to all forms. > > While I don't feel qualified to LGTM this patch, it makes sense to me. > > As discussed on IRC > I added the patch to core-packages-team, but also reverted it to avoid a > world rebuild. Re-reading the IRC log I have noticed I forgot to say my thanks, so, thank you :) > > Just now I pushed a newlyrebased core-packages-team with the patch > in action, see . > > Would you like to also keep an eye out for how that works? I can take a look from time to time (seems to still be building). Let us hope nothing burns down. I *think* it should not really break anything, but who knows, Guix is complex beast and I am not that smart. Have a nice weekend, Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmeBvoQOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wandbQ/9FTixcveZyrU01FUoc8LwZ46W0TB8su8V0kOw Q0lsoQBzyCpKw07S6uvccFNf5qgWpRSwTUOT3nYxnOtya8sya3h0znHFqClrdUBl MwB4sHGKkA3UR2wpehHon6jEe9wKy6pmbDmgSNcCnXl7C+oeLmu1sNUxG1Jg8ZOb adye9jOfB4oWIVGpQkwKtIseKFHJZ7PepCwjD9tKonugGIYhzW/nvl57oYDPyGws Mh+bMy5oa3YA2CFeeDf98VUqifYBc0oglXO30LyRWP6y3C3UKinJNQXolFZTqL/u 7KGkdIBP97XlF22ifnz+fqptq5F68kQZxSyl8m4SaBNH7L5VZzznGj4szXFI/r89 71cdBPNPqmYWRAiU/O3PfAonBmZPEAOzxcYSLpXL0wbJ/+ZZ4H6ftXv3KhBSD+R/ cM4D5cWtwGpcy1ySLeQ2p27RXKwyd4Odm3cwIIp3bQJdws132CGKKt+TYw8zJaCa z0mL1FI3OKICsh6ueSST6gEacRNGqpryE4GmVCRxLby86QTj0uoJwYI8m5emA/Ik ajDFBS55mmhEQ5OCe3LcqqPVP7MC3cJM6B1jtlzgrPolvnbe5zu0jeQWI5ZyTNeK 6aiIIL7wfx3Az4t5NRp83f6k6QJU8PCLPqaukT9tGYdYp+ZeqilkFN73VwVSw+Ta LlmWy9M= =daNr -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jan 2025 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Janneke Nieuwenhuizen Cc: 73660@debbugs.gnu.org Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.173661523132690 (code B ref 73660); Sat, 11 Jan 2025 17:08:02 +0000 Received: (at 73660) by debbugs.gnu.org; 11 Jan 2025 17:07:11 +0000 Received: from localhost ([127.0.0.1]:44647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWex5-0008VC-AY for submit@debbugs.gnu.org; Sat, 11 Jan 2025 12:07:11 -0500 Received: from wolfsden.cz ([37.205.8.62]:41874) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tWex2-0008V0-H9 for 73660@debbugs.gnu.org; Sat, 11 Jan 2025 12:07:09 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 61D95338A0F; Sat, 11 Jan 2025 17:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1736615226; bh=xBGkdOKIFUl7pHheib5olTRevsc7N6dTHP0T6Cdw2bc=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=aNvSs3GDdheuNzmDU7ORf0LGXsstzAlL0px+lLGQS4WCdZ0QP2s8r6j5aPWOUhr+o q0Lm1FuSQChJSrLAgA13/4bjxMS1X2NYhwZDrpxOA4eE1xBl0pfOvl6/1qaACNWqD3 B2p+2KUB60MlaYOOTa72h7E/ixo7R3POR5CM1tKL6GwDfi0zZdHgsjJm6qH87RQqX0 EfM/3vb9hmL0y3KCBAV2PbIZ28C3oArspC6/5osH5kNPP60PBieMDehohM9cNluF+o frWHoicjy2AVJUUT2M0fY8kAhs28i8PGZLIhq4fGTjDojpJgjUNOG/T32blAimBOal 3gexX+Tw8AVJ694KnbYOz5RFdGYsIP7tn/StyxtK7aBWP2QetrRX+s1BACKXmo4Sp3 eEDsLjYNQlbCglCdWCGNRhho0rA2AmL/7OWWZngNvO7blhvu2tRc6Lfp/ICy3phmRo dkQwfqNs90ATblCJAaAgSlC/3KR2ACDTA0nrAyOT3Ho0k5WQyp1nBQUgHVWBHpi9eP Un90OPDLwh9uBEPq0GYzLqHB5s648mnt+UH/be2hJirGDM6pZzd6RLKYHB6ulK5Xi7 Fi9ZGYSvBGmrx46s4eo92FTIHlE+A6R63N433DO61bkhupw4PRZ9WhR2YM8/Pcs6tq ZxycpBE86f2yh9yz3Ll47P4g= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8AF823395AC; Sat, 11 Jan 2025 17:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1736615225; bh=xBGkdOKIFUl7pHheib5olTRevsc7N6dTHP0T6Cdw2bc=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=LyjxsT55ApxG7lW444MNAPF1TNCIPS1UmBgnWXB2DvJmiG3DOBEK3xOzOn4LE7K5P AvzIEMX3u7UMT77cwetFzyOtuKgTbwB3gjrQ+6dD6mR+lLsMmzf9DJlPi2Rf2Kwep2 Jsgj33yvKnfsHpFuiCYGSqY0IUXN5x2cvYnjkSwuIJp3zVS3x1BP1NAGaNUI37Jfna 1e2zYgkaVUBnuC8wjVI4qj0j35BSOMOy1b5JFw8NgEc5MDrMu22ApcDGzqPrTcsLJd ROOe3KMGDSBO4rpykgd8f0z16D3vCL+X8JWRLdiJ2DI2uOeutXwRRIljpHxE0VWxhj hKb1Rd3ejw1WXJ58RLZRUGmp1BMmXdKVVEfETKRHMYbgFCXGMga8qzUNPstGyEoF80 9Xjlv2hY+R/MtxMOTunZyRdX/wAjTaxwuvahxE68mmcveioYhAViZT2aAN1vzhu4i6 8lX2s7p0jEC4WCG6Z/0NNUrG+ssmKkyj4m+9CkX6UmORdlv2psVBruSiH9Tt8smuzI ZixyM9bcpAnCAkcQvTBh1N9gfrPyrEya7UC4mHY8yfhfbXygXA5as9MBdxyYLKMyPI nhciAx83xdVOuCOXX/vm85pCu218xHH2oDOjDjr8l6joYNps9yRnlkcLKnNRpVtuvn RuweUZ9gYchhJlfu6m5MDpUc= From: Tomas Volf <~@wolfsden.cz> In-Reply-To: <87v7ummzgf.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Fri, 10 Jan 2025 17:00:00 +0100") References: <87ttd365hu.fsf@wolfsden.cz> <87v7ummzgf.fsf@gnu.org> Date: Sat, 11 Jan 2025 18:07:05 +0100 Message-ID: <875xmlp9dy.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Janneke Nieuwenhuizen writes: > Would you like to also keep an eye out for how that works? It seems the evaluation failed, however I have no idea if that is due to my changes or not. The first issue I see in the log seems to be: =2D-8<---------------cut here---------------start------------->8--- building of `/gnu/store/5qizz7ba86rd979xspsw3vi2xpg6gq7b-glibc-headers-mesb= oot-2.16.0.drv' timed out after 3600 seconds of silence =2D-8<---------------cut here---------------end--------------->8--- For what it is worth, it fails to me locally as well, but with a different error: =2D-8<---------------cut here---------------start------------->8--- build of /gnu/store/n45z6cfa9i3jdh07q1ib6pcbll8j6jn7-libstdc++-boot0-4.9.4.= drv failed View build log at '/var/log/guix/drvs/n4/5z6cfa9i3jdh07q1ib6pcbll8j6jn7-lib= stdc++-boot0-4.9.4.drv.gz'. cannot build derivation `/gnu/store/gai3hg9c8qb89qlz8fwrgpscmf74g6c8-gcc-cr= oss-boot0-14.2.0.drv': 1 dependencies couldn't be built cannot build derivation `/gnu/store/f2di3rzlyqa2xsby7z197wsldvqixq0l-gcc-cr= oss-boot0-wrapped-14.2.0.drv': 1 dependencies couldn't be built =2D-8<---------------cut here---------------end--------------->8--- Which, looking into the log leads to: =2D-8<---------------cut here---------------start------------->8--- starting phase `patch-tzdb.cc' error: in phase 'patch-tzdb.cc': uncaught exception: system-error "mkstemp!" "~A" ("No such file or directory") (2)=20 phase `patch-tzdb.cc' failed after 0.0 seconds =2D-8<---------------cut here---------------end--------------->8--- I am not sure this is caused by my changes. When I revert the commit: =2D-8<---------------cut here---------------start------------->8--- $ git -C guix-proper log -1 commit 178c8707fc795b7612ed493523a2f4ef5a71966d (HEAD -> xx) Author: Linux User Date: Sat Jan 11 16:56:00 2025 +0000 Revert "gexp: Improve support of Unicode characters." =20=20=20=20 This reverts commit 3532efb0167dae540d9b968b191aa76c4ec79212. =2D-8<---------------cut here---------------end--------------->8--- It still fails with the same error. Any ideas? Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmeCpTkOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wanLtBAAsU8HjVCEDLFI9RpKaEr8bJSTRITWqzd2jq8e xTFGShf4XDT+pTwLBGbsIqgworHIxIIHN+0zMejCiUXHLSu8WoqMdXaNTCFT/8dG NAnSaNbp/oGUVYpDwumhSb3mfAZ8fN8AxssSCHan728Lo0r0cOlJ8ZKNx6QLXey5 BCuITcmhn6RMhJRj40u5YI5XDA9RuOKrkxhoo0idGX5MvaPDdncCCTJxTulAkJS0 GvUvlCSR2KwALwbUu4fY/0iOL9TO2jhNMk5Z4ft1fmJb500KmjlFCyUqAG2jCguz FM54jdRzAkMsHoiWNoJyxfv+NogQG3oFDO6bbSbcCz/0vIN2OP0jiLsRWIzOgKO/ Af1CxAfL6RQyBdm9URY5yRQoXmvqbzKb1K5aeF9Pi0EKWH9bIjP7GGC/N6gpkt7S GDjmUrXOSg7iH8X4YGaFyfM0taeCC9NSgBtLW/gGKsUBOk6GcQt8eXJErkJCUzOj 1kyyyfDMStxrr8jsE2D4Ta9qz771Xfux74HnU4PC4zUtaCmbB4QUUYmL+tHOFUUT vqrvoCAXnnO6TzomcKFj6uoo07HuUsd7VZee6tm/LdOGMK7M5L6jQZNmAoB2Su67 wO/bIHlHq4HAC3gk0BztAO6ykOVZYmmj6x6MWanc76HhC3qu49BqUMgs4QQx3gi6 CtZt+5s= =Iq5M -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jan 2025 18:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: 73660@debbugs.gnu.org Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.173661901313760 (code B ref 73660); Sat, 11 Jan 2025 18:11:01 +0000 Received: (at 73660) by debbugs.gnu.org; 11 Jan 2025 18:10:13 +0000 Received: from localhost ([127.0.0.1]:44744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWfw4-0003Zp-Pv for submit@debbugs.gnu.org; Sat, 11 Jan 2025 13:10:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55086) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWfw1-0003VI-Ru for 73660@debbugs.gnu.org; Sat, 11 Jan 2025 13:10:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tWfvu-00009C-6c; Sat, 11 Jan 2025 13:10:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=yUly/cODHqAHw+ObY7Bej52Tsfj8IlnQq1NbIkJh2Zo=; b=otj79orEVVzpXHUqzilO sbIDh96iNc3QVRc+SLInr35qWhlfG9MQtRGi8fV5EDW2wlFJSR6K9e8hPYq4ewAOFTFjEzBMZQDZI bt+NT/R4srENBOG1QLpTQGx/pp6lxdLnFcYsu2iDA/VKX0qWmx2xgYhT/FRkCVH5am79B3oNXp/ro uqpWdd1Lw/VtOcD6PevfZ+l1/ZhHjGDusWlLhd0ueTgVNzR/mFSSGmL7msfo7nmTu19bqzRuS2oT2 lFJROC5NEtD3P4UFTFG+f8vuVuQ5rdB0YJllnttZq4mtbNJFp8WCar07WgoEWMRZwlG3tnuHIL1R7 9MvvU9fiw4W4xA==; From: Janneke Nieuwenhuizen In-Reply-To: <875xmlp9dy.fsf@wolfsden.cz> (Tomas Volf's message of "Sat, 11 Jan 2025 18:07:05 +0100") Organization: AvatarAcademy.nl References: <87ttd365hu.fsf@wolfsden.cz> <87v7ummzgf.fsf@gnu.org> <875xmlp9dy.fsf@wolfsden.cz> X-Url: http://AvatarAcademy.nl Date: Sat, 11 Jan 2025 19:09:55 +0100 Message-ID: <878qrhmdcc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tomas Volf writes: Hello Tomas, > Janneke Nieuwenhuizen writes: > >> Would you like to also keep an eye out for how that works? > > It seems the evaluation failed, however I have no idea if that is due to > my changes or not. The first issue I see in the log seems to be: > > building of > `/gnu/store/5qizz7ba86rd979xspsw3vi2xpg6gq7b-glibc-headers-mesboot-2.16.0= .drv' > timed out after 3600 seconds of silence Ah. I wondered why there was a big red cross instead of a lot of nice green builds... > For what it is worth, it fails to me locally as well, but with a > different error: > > build of /gnu/store/n45z6cfa9i3jdh07q1ib6pcbll8j6jn7-libstdc++-boot0-4.9.= 4.drv failed > View build log at '/var/log/guix/drvs/n4/5z6cfa9i3jdh07q1ib6pcbll8j6jn7-l= ibstdc++-boot0-4.9.4.drv.gz'. > cannot build derivation `/gnu/store/gai3hg9c8qb89qlz8fwrgpscmf74g6c8-gcc-= cross-boot0-14.2.0.drv': 1 dependencies couldn't be built > cannot build derivation `/gnu/store/f2di3rzlyqa2xsby7z197wsldvqixq0l-gcc-= cross-boot0-wrapped-14.2.0.drv': 1 dependencies couldn't be built > > > Which, looking into the log leads to: > > starting phase `patch-tzdb.cc' > error: in phase 'patch-tzdb.cc': uncaught exception: > system-error "mkstemp!" "~A" ("No such file or directory") (2)=20 > phase `patch-tzdb.cc' failed after 0.0 seconds Weird! Oh wait, I removed guards around that stage. core-packages-team-old has --8<---------------cut here---------------start------------->8--- #$@(if (target-hurd64?) #~((add-after 'unpack 'patch-hurd64 (lambda _ (substitute* "libstdc++-v3/src/c++20/tzdb.cc" (("#if ! defined _GLIBCXX_ZONEINFO_DIR") "#if __GNU__ || ! defined _GLIBCXX_ZONEINFO_DIR"= ))))) '()) #$@(if (and (target-x86-64?) (target-linux?) (version>=3D? (package-version gcc) "14")) #~((add-after 'unpack 'patch-x86_64-linux (lambda _ (substitute* "libstdc++-v3/src/c++20/tzdb.cc" (("#if ! defined _GLIBCXX_ZONEINFO_DIR") "#if __x86_64__ || ! defined _GLIBCXX_ZONEINFO_D= IR"))))) '()) #$@(if (and (target-x86-32?) (target-linux?) (version>=3D? (package-version gcc) "14")) #~((add-after 'unpack 'patch-x86_64-linux (lambda _ (substitute* "libstdc++-v3/src/c++20/tzdb.cc" (("#if ! defined _GLIBCXX_ZONEINFO_DIR") "#if __i386__ || __x86_64__ || ! defined _GLIBCX= X_ZONEINFO_DIR"))))) '()) #$@(if (and (target-linux?) (not (target-x86-64?)) (not (target-x86-32?)) (version>=3D? (package-version gcc) "14")) #~((add-after 'unpack 'patch-tzdb.cc (lambda _ (substitute* "libstdc++-v3/src/c++20/tzdb.cc" (("#if ! defined _GLIBCXX_ZONEINFO_DIR") "#if 1 // ! defined _GLIBCXX_ZONEINFO_DIR"))))) '())) --8<---------------cut here---------------end--------------->8--- and the new core-packages-team has --8<---------------cut here---------------start------------->8--- (add-after 'unpack 'patch-tzdb.cc (lambda _ (substitute* "libstdc++-v3/src/c++20/tzdb.cc" (("#if ! defined _GLIBCXX_ZONEINFO_DIR") "#if 1 // ! defined _GLIBCXX_ZONEINFO_DIR"))))) --8<---------------cut here---------------end--------------->8--- ow, there it already is. Silly me, we need the gcc-14 guard. I was so happy all systems seemed to need the same code that I also removed the check for gcc-14. > I am not sure this is caused by my changes. When I revert the commit: Certainly not! But thanks for trying! [..] > Any ideas? Meanwhile, because it seemed the build farm stopped working for me, I started to build myself again and currently have --8<---------------cut here---------------start------------->8--- successfully built /gnu/store/5qizz7ba86rd979xspsw3vi2xpg6gq7b-glibc-header= s-mesboot-2.16.0.drv successfully built /gnu/store/91212rdl4cn4rr8aqfrbilxagmx9fwj3-glibc-mesboo= t-2.16.0.drv successfully built /gnu/store/5a0bd35brzf1sgnw10slaxipmxa3cafn-gcc-mesboot1= -wrapper-4.6.4.drv --8<---------------cut here---------------end--------------->8--- so I didn't see this problem yet. I've pushed a squash! commit that should fix this. Thanks! Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2025 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: Josselin Poiret , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , 73660@debbugs.gnu.org, Christopher Baines Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17366951918070 (code B ref 73660); Sun, 12 Jan 2025 15:20:01 +0000 Received: (at 73660) by debbugs.gnu.org; 12 Jan 2025 15:19:51 +0000 Received: from localhost ([127.0.0.1]:48762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWzkk-000265-O1 for submit@debbugs.gnu.org; Sun, 12 Jan 2025 10:19:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37058) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWzkh-00025q-Dt for 73660@debbugs.gnu.org; Sun, 12 Jan 2025 10:19:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tWzka-00009u-LT; Sun, 12 Jan 2025 10:19:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=W3VvkxB3bXCXpYrWW1ZazxpZeqM1IrKstNFCEs9PT9M=; b=Sof0RT2yinf7FWpmu7oG tszQMJx6H/JtYprLBRfNGsP3xnSFCSglJfOXjSD23OYQuuLHrWIS74mwif15gJ3g6u9Sy/feTRii0 BOxqYF0I6YUWR1m6RPp/tB4keawT5H0WJz1GRC069W+9+FGERogqHiTHKLZOISvkxhGo0KPwbY4P1 GK+QnaDuoTLhcWoS8oAVmqMARb27ZcT6omNzn6WVdDmZrTuSheRIniM+diOK+Xy46VHgKqGCILmXp 3ofuRtYK98BDfviK9aLiYisoJ9r7mulW/kBsuFvpN4c5EO5YQrOLkR335vZ/qMmpnltQx2TaiKHo2 EFRWvuKOfYkYww==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Tomas Volf's message of "Sun, 6 Oct 2024 17:42:26 +0200") References: Date: Sun, 12 Jan 2025 16:19:35 +0100 Message-ID: <874j24kqk8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Tomas Volf <~@wolfsden.cz> skribis: > * guix/gexp.scm (computed-file): Set LANG to C.UTF-8 by default. > (compiled-modules): Try to `setlocale'. > (gexp->script), (gexp->file): New `locale' argument defaulting to C.UTF-8. > (text-file*): Set output port encoding to UTF-8. > * doc/guix.texi (G-Expressions)[computed-file]: Document the changes. Use > @var. Document #:guile. > [gexp->script]: Document #:locale. Fix default value for #:target. > [gexp->file]: Document #:locale, #:system and #:target. > > Change-Id: Ib323b51af88a588b780ff48ddd04db8be7c729fb [...] > (define* (computed-file name gexp > - #:key guile (local-build? #t) (options '())) > + #:key > + guile > + (local-build? #t) > + (options '(#:env-vars (("LANG" . "C.UTF-8"))))) I=E2=80=99d suggest LC_CTYPE (or LC_ALL?) rather than LANG. Also, what about making it the default for the #:env-vars of =E2=80=98gexp->derivation=E2=80=99? That way it wouldn=E2=80=99t need to b= e repeated in several places. > @@ -1700,6 +1703,9 @@ (define* (compiled-modules modules > (system base target) > (system base compile)) >=20=20 > + ;; Best effort. The locale is not installed in all contexts. > + (false-if-exception (setlocale LC_ALL "C.UTF-8")) Sounds good. I would make it a separate patch. s/in all contexts/when cross-compiling/ > @@ -1990,7 +1996,8 @@ (define* (gexp->script name exp > #:key (guile (default-guile)) > (module-path %load-path) > (system (%current-system)) > - (target 'current)) > + (target 'current) > + (locale "C.UTF-8")) I would remove this argument and instead add an explicit, hard-coded: (set-port-encoding! port "UTF-8") in the body of =E2=80=98call-with-output-file=E2=80=99 here, just like you = did below. > (define* (text-file* name #:rest text) > "Return as a monadic value a derivation that builds a text file contai= ning > @@ -2108,6 +2119,7 @@ (define* (text-file* name #:rest text) > (define builder > (gexp (call-with-output-file (ungexp output "out") > (lambda (port) > + (set-port-encoding! port "UTF-8") > (display (string-append (ungexp-splicing text)) port))))) LGTM. This can be moved to a separate file. How does that sound? Apologies for not replying earlier! Ludo=E2=80=99. From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH v2 1/3] gexp: Improve support of Unicode characters. References: In-Reply-To: Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 22:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73660@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17376730475409 (code B ref 73660); Thu, 23 Jan 2025 22:58:01 +0000 Received: (at 73660) by debbugs.gnu.org; 23 Jan 2025 22:57:27 +0000 Received: from localhost ([127.0.0.1]:42743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tb68d-0001PA-3e for submit@debbugs.gnu.org; Thu, 23 Jan 2025 17:57:27 -0500 Received: from wolfsden.cz ([37.205.8.62]:42790) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tb68Z-0001Oo-0B for 73660@debbugs.gnu.org; Thu, 23 Jan 2025 17:57:25 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id DD06833B385; Thu, 23 Jan 2025 22:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673040; bh=8wUld2G4VSkqgKa96cVQYdJrpjC3CHpaV3eY6pkvJc0=; h=From:To:Cc:Subject:Date; b=wQErzzFcMJQ2NCVbYTl/KzCD2DjSWj40kVJifra3g2JYwm05IozWQpOATO4V0iIXa PgVVRRJFEzIl+BePahf9HulBP2kJLIce12hSWEGF6MmltG9FdBdkQaMavtB5BMndyf EbjpnSzlPc3aJkcL+Ao+l6DHKqgyVKyQzblNp4QHPPOXPnzWoPtTSOT/VwI4J5S7CM xuUg8oXQ4kZGVO3H1HMjxfBk2KVLu/oLDYtJu9ny260x7rkjbUCxG78TUBodqTiTX9 eD/pP8WwavrIlyTpO1uQ7mYIsqPMR5lMXncmrvjTA9eEEXB85FKAi/+jsT9GCtLa9W 0NJ7IBIsA4UoJb/7ZNa+26v3d86bBoa89btXnbFAv9YK+UWaW+bpdAoKwPxF21nA6d g9S5I5duLC/jolyawn6Mahj63Xx+cBoOrzFycPNkPwfGageOc29f1GBZOv6q2Z5pLx IzRsP7AExPA2mBWBHeYKeMq8WapZLa7kw1lDJfCB4ZuCvHWHSXRYbj2vP4ccap1v+V 1+tF3jMB0o6Kf+f0I9vYoEwW/jcsupGHWwLOFx0SCGEENoSPtzOyLHg12dBtF6V/9D JwPC07ZIAiiH6Q4eCmacTyeezeDR32+Gdu5UCBdenLz02G73gnLT2ayG+5jxt7VeXV PjEFgvIS0V12mN+oj2hwLh9M= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 28BBB33A4BE; Thu, 23 Jan 2025 22:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673040; bh=8wUld2G4VSkqgKa96cVQYdJrpjC3CHpaV3eY6pkvJc0=; h=From:To:Cc:Subject:Date; b=wQErzzFcMJQ2NCVbYTl/KzCD2DjSWj40kVJifra3g2JYwm05IozWQpOATO4V0iIXa PgVVRRJFEzIl+BePahf9HulBP2kJLIce12hSWEGF6MmltG9FdBdkQaMavtB5BMndyf EbjpnSzlPc3aJkcL+Ao+l6DHKqgyVKyQzblNp4QHPPOXPnzWoPtTSOT/VwI4J5S7CM xuUg8oXQ4kZGVO3H1HMjxfBk2KVLu/oLDYtJu9ny260x7rkjbUCxG78TUBodqTiTX9 eD/pP8WwavrIlyTpO1uQ7mYIsqPMR5lMXncmrvjTA9eEEXB85FKAi/+jsT9GCtLa9W 0NJ7IBIsA4UoJb/7ZNa+26v3d86bBoa89btXnbFAv9YK+UWaW+bpdAoKwPxF21nA6d g9S5I5duLC/jolyawn6Mahj63Xx+cBoOrzFycPNkPwfGageOc29f1GBZOv6q2Z5pLx IzRsP7AExPA2mBWBHeYKeMq8WapZLa7kw1lDJfCB4ZuCvHWHSXRYbj2vP4ccap1v+V 1+tF3jMB0o6Kf+f0I9vYoEwW/jcsupGHWwLOFx0SCGEENoSPtzOyLHg12dBtF6V/9D JwPC07ZIAiiH6Q4eCmacTyeezeDR32+Gdu5UCBdenLz02G73gnLT2ayG+5jxt7VeXV PjEFgvIS0V12mN+oj2hwLh9M= From: Tomas Volf <~@wolfsden.cz> Date: Thu, 23 Jan 2025 23:57:06 +0100 Message-ID: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Support for non-ASCII characters was mixed. Some gexp forms did support them, while others did not. Combined with current value for %default-port-conversion-strategy, that sometimes led to unpleasant surprises. For example: (scheme-file "utf8" #~(with-output-to-file #$output (λ _ (display "猫")))) Was written to the store as: ((? _ (display "\u732b"))) No, that is not font issue on your part, that is an actual #\? instead of the lambda character. Which, surprisingly, does not do what it should when executed. The solution is to switch to C.UTF-8 LC_CTYPE where possible, since it is now always available. Or to explicitly set the port encoding. No tests are provided, since majority of tests/gexp.scm use guile in version 2, and it tends to work under it. The issues occur mostly with guile 3. I did test it locally using: #!/bin/sh set -eu set -x [ -f guix.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; } [ -f gnu.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; } cat >猫.scm <<'EOF' (define-module (猫) #:export (say)) (define (say) "nyaaaa~~~~!") EOF mkdir -p dir-with-utf8-file cp 猫.scm dir-with-utf8-file/ cat >repro.scm <<'EOF' (use-modules (guix build utils) (guix derivations) (guix gexp) (guix store) (ice-9 ftw) (ice-9 textual-ports)) (define cat "猫") (define (drv-content drv) (call-with-input-file (derivation->output-path drv) get-string-all)) (define (out-content out) (call-with-input-file out get-string-all)) (define (drv-listing drv) (scandir (derivation->output-path drv))) (define (dir-listing dir) (scandir dir)) (define-macro (test exp lower? report) (let ((type (car exp))) `(false-if-exception (let ((drv (with-store %store (run-with-store %store (,(if lower? lower-object identity) ,exp))))) (format #t "~%~a:~%" ',type) (when (with-store %store (build-derivations %store (list drv))) (format #t "~a~%" (,report drv))))))) (test (computed-file "utf8" #~(with-output-to-file #$output (λ _ (display #$cat)))) #t drv-content) (test (program-file "utf8" #~((λ _ (display #$cat)))) #t drv-content) (test (scheme-file "utf8" #~((λ _ (display #$cat)))) #t drv-content) (test (text-file* "utf8" cat cat cat) #f drv-content) (test (compiled-modules '((猫))) #f drv-listing) (test (file-union "utf8" `((,cat ,(plain-file "utf8" cat)))) #t drv-listing) ;;; No fix needed: (test (imported-modules '((猫))) #f dir-listing) (test (local-file "dir-with-utf8-file" #:recursive? #t) #t dir-listing) (test (plain-file "utf8" cat) #t out-content) (test (mixed-text-file "utf8" cat cat cat) #t drv-content) (test (directory-union "utf8" (list (local-file "dir-with-utf8-file" #:recursive? #t))) #t dir-listing) EOF guix shell -CWN -D guix glibc-locales -- \ env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm Before this series, the output is: + '[' -f guix.scm ']' + '[' -f gnu.scm ']' + cat + mkdir -p dir-with-utf8-file + cp 猫.scm dir-with-utf8-file/ + cat + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm computed-file: ? program-file: #!/gnu/store/mfkz7fvlfpv3ppwbkv0imb19nrf95akf-guile-3.0.9/bin/guile --no-auto-compile !# ((? _ (display "\u732b"))) scheme-file: ((? _ (display "\u732b"))) text-file*: ??? compiled-modules: building path(s) `/gnu/store/ay3jifyvliigfgnz67jf0kgngzpya5a5-module-import-compiled' Backtrace: 5 (primitive-load "/gnu/store/rn7b0dq6iqfmmqyqzamix2mjmfy?") In ice-9/eval.scm: 619:8 4 (_ #f) In srfi/srfi-1.scm: 460:18 3 (fold # ?) In ice-9/eval.scm: 245:16 2 (_ #(#(#) # ?)) In ice-9/boot-9.scm: 1982:24 1 (_ _) In unknown file: 0 (stat "./???.scm" #) ERROR: In procedure stat: In procedure stat: No such file or directory: "./???.scm" builder for `/gnu/store/dxg87135zcd6a1c92dlrkyvxlbhfwfld-module-import-compiled.drv' failed with exit code 1 file-union: (. .. ?) imported-modules: (. .. 猫.scm) local-file: (. .. 猫.scm) plain-file: 猫 mixed-text-file: 猫猫猫 directory-union: (. .. 猫.scm) Which I think you will agree is far from optimal. After these fixes the output changes to: + '[' -f guix.scm ']' + '[' -f gnu.scm ']' + cat + mkdir -p dir-with-utf8-file + cp 猫.scm dir-with-utf8-file/ + cat + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm computed-file: 猫 program-file: #!/gnu/store/8kbmn359jqkgsbqgqxnmiryvd9ynz8w7-guile-3.0.9/bin/guile --no-auto-compile !# ((λ _ (display "猫"))) scheme-file: ((λ _ (display "猫"))) text-file*: 猫猫猫 compiled-modules: (. .. 猫.go) file-union: (. .. 猫) imported-modules: (. .. 猫.scm) local-file: (. .. 猫.scm) plain-file: 猫 mixed-text-file: 猫猫猫 directory-union: (. .. 猫.scm) Which is actually what the user would expect. * guix/gexp.scm (gexp->derivation): Default LC_CTYPE to C.UTF-8. (gexp->script, text-file*): Set port encoding to UTF-8. Change-Id: Ie92a57fe1c3b45d1c7a5e8865fcf291c5f590c11 --- guix/gexp.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/gexp.scm b/guix/gexp.scm index e44aea6420..de4afc190c 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -1141,7 +1141,7 @@ (define* (gexp->derivation name exp #:key system (target 'current) hash hash-algo recursive? - (env-vars '()) + (env-vars '(("LC_CTYPE" . "C.UTF-8"))) (modules '()) (module-path %load-path) (guile-for-build (%guile-for-build)) @@ -2010,6 +2010,8 @@ (define* (gexp->script name exp (gexp (call-with-output-file (ungexp output) (lambda (port) + (set-port-encoding! port "UTF-8") + ;; Note: that makes a long shebang. When the store ;; is /gnu/store, that fits within the 128-byte ;; limit imposed by Linux, but that may go beyond @@ -2108,6 +2110,7 @@ (define* (text-file* name #:rest text) (define builder (gexp (call-with-output-file (ungexp output "out") (lambda (port) + (set-port-encoding! port "UTF-8") (display (string-append (ungexp-splicing text)) port))))) (gexp->derivation name builder -- 2.47.1 From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH v2 2/3] gexp: Attempt to set LC_CTYPE in compiled-modules. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 22:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73660@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17376730525426 (code B ref 73660); Thu, 23 Jan 2025 22:58:02 +0000 Received: (at 73660) by debbugs.gnu.org; 23 Jan 2025 22:57:32 +0000 Received: from localhost ([127.0.0.1]:42748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tb68h-0001PS-MU for submit@debbugs.gnu.org; Thu, 23 Jan 2025 17:57:31 -0500 Received: from wolfsden.cz ([37.205.8.62]:47410) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tb68c-0001P3-4c for 73660@debbugs.gnu.org; Thu, 23 Jan 2025 17:57:26 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 39CC033ABA6; Thu, 23 Jan 2025 22:57:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673045; bh=PfFi+kAe31+ZaFXpao3f4KHOwvF6fyudGisTBtqJLYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Mse21gmyJxjDmBPaDTtwqBIZ78wf+pdj/Qllq/xNP2mDsnxrZAuThtoCc2GnYXcp5 E2XI73LpAXioxOzl0FDpGPrs0g9jJaytjeGMPilWstePAZsIVDqLWGhzuINOcpoNlf 30g/7awVA+1xnm4bfX3rvWswWeWk8PMHz5ymXmyp6gRBwmqV7A8c/QGnAtV/CnQzO3 FqWhZAzBObtMzWqnUG5r4vYxA3rR9DNFZMRsMYiDHmY1cKrI+eIdHhnE0ktKsd4noG Ubf5D/AUe9mTscB6blkWqqM2Fi5J3LQ/5yBTm9Qq+IH0q8SlG9rfSutoEGDoWnWitS XltkUScUN2bHsIxPaNT2o3YJwSPi1zC3/FPUmZ1+z93dwsb7CQgZnS7LmdU33/jS8A UShyX54n1a4334vGZ5ReLM0FJgh85NMKZTLfXVKs8IiIk/euQzR32tFtvKOZzDorD0 mPWb035AuSCCEBIgevHoz3XzkXxcCpDO43G3p2mfp8PkssNxhFpgDaS4EtzaFgg9a9 p/jT5kbWYbq1ptNO5YNRQ846+jrBr7PbRS7ZkT5E6+8CCDaHi7uXXVNZCvDcinco++ lHlZrNXoM8qVCBElabufU089JOwJ6G62IUM8Hqyjtm3FzUSbiIdE9yGiA6I+P8dI+4 IKfpe1t+pEK2clMYYxSYn8zY= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 0D1F2339FD3; Thu, 23 Jan 2025 22:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673044; bh=PfFi+kAe31+ZaFXpao3f4KHOwvF6fyudGisTBtqJLYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Nm/IIY2UpGCjOPU8lwG1CiJPz7qseFudScHgy6scK7+LgolDUUheiTgMbEKG0o4eM C/f5AWPpf27rfE+KUp7RgrI++hbqyXMg01oKcMi7l+hpFxh4nUkMrhrPls6ZL/MvWK 3NNdBjnUp4Duu/Zhc2IcMiVY/HNAQrtxOOu3O/xNMLWGGr/I2NFs6GLxauOw6l8Xe+ S52pbyJXKiHBEEirSsMQuzscu5kQW4SIqhFhbvnvYnA/sqF/I/DZ4jW6eNnQFzOrVB 2Dy08fB3EqBkSSd6O9ie737O+2q+FsB2NORCFLp4786Xvo4ndNuxKJB8hgg4mqhslW WhAW/ChMq9cedJ4zyJsElvHwfbn2DH3OzMhHg32nfCrjZWBG8VUljW9Iokme89X3nW Lahs5j7XjZoqJV2psUB1CXMJRejdKaOpzBR47KOhvoIs7ydxEXBxWRd6F/Xvh6lJhC H2pVylRytZw9wCaei/DObm1udFKudTWa3WW3vDr28Aa+g5ZekdMXAdmrDs/5nJXSQw 6fe+YcrFT06obK5O/BNLVH4lo4xlZ1zh2vohVNBeyeRUzDTlhqzhG0DZEqqrDmmoJ5 AH16K6h7qO6DKG/H25ZlqaJkQOcHrzey1dKvzN9bRjyLFt//7EuGRNECWMRvcdg+zO 2IZp7I2Qg0VXgkqewfRbO1NA= From: Tomas Volf <~@wolfsden.cz> Date: Thu, 23 Jan 2025 23:57:07 +0100 Message-ID: <31525cd84820461c6e69f3382f4e67e0891a667d.1737673028.git.~@wolfsden.cz> X-Mailer: git-send-email 2.47.1 In-Reply-To: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> References: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This allows compiling modules with unicode in their names. * guix/gexp.scm (compiled-modules): Attempt to set LC_CTYPE to C.UTF-8. Change-Id: Ie92a57fe1c3b45d1c7a5e8865fcf291c5f590c11 --- guix/gexp.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guix/gexp.scm b/guix/gexp.scm index de4afc190c..0e99069a56 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -1700,6 +1700,9 @@ (define* (compiled-modules modules (system base target) (system base compile)) + ;; Best effort. The locale is not installed when cross-compiling. + (false-if-exception (setlocale LC_CTYPE "C.UTF-8")) + (define modules (getenv "modules")) -- 2.47.1 From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH v2 3/3] doc: Update arguments for gexp procedures. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 22:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73660@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17376730525433 (code B ref 73660); Thu, 23 Jan 2025 22:58:02 +0000 Received: (at 73660) by debbugs.gnu.org; 23 Jan 2025 22:57:32 +0000 Received: from localhost ([127.0.0.1]:42750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tb68i-0001PY-3r for submit@debbugs.gnu.org; Thu, 23 Jan 2025 17:57:32 -0500 Received: from wolfsden.cz ([37.205.8.62]:47416) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tb68e-0001PI-Ii for 73660@debbugs.gnu.org; Thu, 23 Jan 2025 17:57:28 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 9FD8A33B409; Thu, 23 Jan 2025 22:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673047; bh=rH5OTNotifyTlijXNcy/ciuMxBDaMohEBhrd5C+GoBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=B+QMymAIFxFIUFxzTTI738L/iDPE/KRZpD5RuW9Ak1ObMe/AuSJUtVFnhfFlyTUAS /xPreYyNP5b8kviWD3cw4Y6ust5ZWMcE2n8WM89oGe1bA9jah5VW5fInCj1wkZirLd hN72YkNpZ2zoVxFXFnzgJMEzDs3c+8W/P3gasYESjtyhRZ6P5y9AYcrr8Y/ezh6RTZ UmkrL6+VhQCP2oQtsJTFZK/t/COyncbgP2eQl6k9Nwe9DHYOXNgl0Ghw7j1FNEmLmn piIugyqSms1CsFtlAWSfFv6ztWfDRIVl4D/vxUdD1h3IPHl4DgmAJ+g4ZT7KgYYRoD hVIPkTxDEvUePJyersdw9YiHhrzDtyg4rMo0WMj026JGd+JF4nk/ZmtUGhpiZet6p9 zyPB+ulmIIYad1hF+9msYkfK2g6Wdv2yEw202RWiXuX4SXmsJ5SEfiAQv+DKkJGD8E mh0tT4nkmBsoM8Ab7d8fk1IadKQuFYEIBxSVN3JK361Ov4LB1oohQ40xYAqB8Zo8gz zJJxiJOvagYKsFR7DkGdHAcxodRFWSToDsVs7wP4ZfrZte5exSXcQ/zFWRGdzCEu7A FtZ6UPsLbRyb5Aj9BlgcadMku2P+kuZAaoHBH2/+hfsIiHEtngv9DqSe5fw9npkoNE pykoV55D8fDZoF1A/6tJ5UJo= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 4099B3396F8; Thu, 23 Jan 2025 22:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673047; bh=rH5OTNotifyTlijXNcy/ciuMxBDaMohEBhrd5C+GoBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=B+QMymAIFxFIUFxzTTI738L/iDPE/KRZpD5RuW9Ak1ObMe/AuSJUtVFnhfFlyTUAS /xPreYyNP5b8kviWD3cw4Y6ust5ZWMcE2n8WM89oGe1bA9jah5VW5fInCj1wkZirLd hN72YkNpZ2zoVxFXFnzgJMEzDs3c+8W/P3gasYESjtyhRZ6P5y9AYcrr8Y/ezh6RTZ UmkrL6+VhQCP2oQtsJTFZK/t/COyncbgP2eQl6k9Nwe9DHYOXNgl0Ghw7j1FNEmLmn piIugyqSms1CsFtlAWSfFv6ztWfDRIVl4D/vxUdD1h3IPHl4DgmAJ+g4ZT7KgYYRoD hVIPkTxDEvUePJyersdw9YiHhrzDtyg4rMo0WMj026JGd+JF4nk/ZmtUGhpiZet6p9 zyPB+ulmIIYad1hF+9msYkfK2g6Wdv2yEw202RWiXuX4SXmsJ5SEfiAQv+DKkJGD8E mh0tT4nkmBsoM8Ab7d8fk1IadKQuFYEIBxSVN3JK361Ov4LB1oohQ40xYAqB8Zo8gz zJJxiJOvagYKsFR7DkGdHAcxodRFWSToDsVs7wP4ZfrZte5exSXcQ/zFWRGdzCEu7A FtZ6UPsLbRyb5Aj9BlgcadMku2P+kuZAaoHBH2/+hfsIiHEtngv9DqSe5fw9npkoNE pykoV55D8fDZoF1A/6tJ5UJo= From: Tomas Volf <~@wolfsden.cz> Date: Thu, 23 Jan 2025 23:57:08 +0100 Message-ID: <15a754610b97756570ed4a23ddfaab29d71683d9.1737673028.git.~@wolfsden.cz> X-Mailer: git-send-email 2.47.1 In-Reply-To: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> References: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Some keyword arguments were missing, some had wrong default values. This commit updates the documentation to match the code. * doc/guix.texi (G-Expressions)[computed-file]: Use @var. Document #:guile. [gexp->script]: Fix default value for #:target. [gexp->file]: Document #:system and #:target. Change-Id: Ie92a57fe1c3b45d1c7a5e8865fcf291c5f590c11 --- doc/guix.texi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3b32d5408e..9d9e6a1459 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12415,7 +12415,8 @@ G-Expressions This is the declarative counterpart of @code{text-file}. @end deffn -@deffn {Procedure} computed-file name gexp [#:local-build? #t] [#:options '()] +@deffn {Procedure} computed-file @var{name} @var{gexp} @ + [#:guile] [#:local-build? #t] [#:options '()] Return an object representing the store item @var{name}, a file or directory computed by @var{gexp}. When @var{local-build?} is true (the default), the derivation is built locally. @var{options} is a list of @@ -12426,7 +12427,7 @@ G-Expressions @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} @ [#:guile (default-guile)] [#:module-path %load-path] @ - [#:system (%current-system)] [#:target #f] + [#:system (%current-system)] [#:target 'current] Return an executable script @var{name} that runs @var{exp} using @var{guile}, with @var{exp}'s imported modules in its search path. Look up @var{exp}'s modules in @var{module-path}. @@ -12463,8 +12464,8 @@ G-Expressions @deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @ [#:set-load-path? #t] [#:module-path %load-path] @ - [#:splice? #f] @ - [#:guile (default-guile)] + [#:splice? #f] [#:guile (default-guile)] @ + [#:system (%current-system)] [#:target 'current] Return a derivation that builds a file @var{name} containing @var{exp}. When @var{splice?} is true, @var{exp} is considered to be a list of expressions that will be spliced in the resulting file. -- 2.47.1 From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jan 2025 22:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , 73660@debbugs.gnu.org, Christopher Baines Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17376731385605 (code B ref 73660); Thu, 23 Jan 2025 22:59:02 +0000 Received: (at 73660) by debbugs.gnu.org; 23 Jan 2025 22:58:58 +0000 Received: from localhost ([127.0.0.1]:42767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tb6A5-0001SL-MJ for submit@debbugs.gnu.org; Thu, 23 Jan 2025 17:58:58 -0500 Received: from wolfsden.cz ([37.205.8.62]:44786) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tb6A2-0001S7-Gp for 73660@debbugs.gnu.org; Thu, 23 Jan 2025 17:58:55 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 9791433AAB8; Thu, 23 Jan 2025 22:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673133; bh=+c5Avh/vhrYQsJNtROn7mycil10RiaSARXGAQL13ZlQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=IAWRK2nBx6IJwnrR9UPQ+xLwPLfbwQ9pfoWkm4kH6q+IqbHTVrXaJlLJ4pLIA0mwU LX6x4wOx1WtLj1wUswQBPIl80KcJNUqAxLmPil8W87LCPiIUD6txLmL2khtS9iW3qJ giyUDePGyNoNR0lp6EwidoTUhWr+jwZQZwAZTcm82K2cX7IECN6vxkjt7adXMb3bDA oGQz693Xf/gKxX+6rGxFtucq20blNb0OqTbfFujlcI3nlBeS011l1R1kcl9ox+elnP UnqyyorpjFZLTxoHNzS1G97q4w79oRpiJejMvUOMy33H2P9JjYEUAQYMRMbufVOFO+ dht3OTUerM4jW+qaBBtQmM12ZRIdo/sOEDvUBs2t5qyh6/AUX96sIyr04d4noFF8W5 Ah5VTe3PwwsupOs4vfqrFkiDSRYXCpafIw0vx9M89ohPKw9JCwt4wcwDg2xfVmGbrS 1f9S3kRaI6K3pPyXHPqleNFdTYnLoAXAEwFN/pnk3Zie3Y49SBM/TjXnabUd+Lw6Y0 2ckzaNafLhJvVLiDSLNvV1lieOvHuDTdtuP12bzMfvgMZdf0x95GNkav4AXKsDtfOh rTu/UXaUEeNpizQzU/Vpm0fkFZWbK+yFNDDDsp/3YHPjRlDgKByeN3U6wMLUPcC+yA 4d5aAzWAGc4R0iFie4BfoZbE= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id D4A2C3394E2; Thu, 23 Jan 2025 22:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1737673131; bh=+c5Avh/vhrYQsJNtROn7mycil10RiaSARXGAQL13ZlQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=tQyT8RmpK/+6Be3chVAhusZKEPxRn8+bZxuAWhu9ULk3MTjJWFNo6h5FuENEXme0L VyamWpSwMtlL2JhdCd0mE1xsS80f1NTZsHFpHB1j6TDYqvEj5QcvhotYPXGCBg96TJ t9E5gBseRMWbP5oBBtADRDSaOazJC1TAmI6P7BzVQ8g2+ENtW/ZARIhLKL2h8KFEgW aU7zWqskzvS9hAWAfjQlQ063zOmGSvN6r7tnjTJ3UrbeAP+cLI9UGWBShvJ4Au7vv8 0/bkLobwOVd/cAKFwdDjhTYaY0A0Pn6YsS4GZ9ebYN0CHD9KGCt+LNAQvcD18DU+Rc nEKrmvqrprvD/tRXNsLR9Nt64m7ZEYpeJQR85cXHc2ktu6JHF5x6Q4er2NFdYnPyRN nO/2eS02gpDVczJhEMtr49BClDxUkcGHhc3/xjPR1P4hoXyKJEStnPsEI49v82hrOd ZjCTgFPwgoy+Y9tiMKlM+GTDWwGQWxJZEKmtam33Y84XJ7BgqH7kZiUUehXKnv3juf kbRQkwXci+/fyvdRnhB32MbiJ9hpVPRDzDWrUbhYrcRj9VVgXVJudwcGVAhGun/wMy djoC+m+IkZEPFN2O3vASixusNkSDWUwkfq9wA0e4ghPH0aRRWmqbaHhFts6uGqQS9p TzY5xfzXgUPzZXsWs8FtS13s= From: Tomas Volf <~@wolfsden.cz> In-Reply-To: <874j24kqk8.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 12 Jan 2025 16:19:35 +0100") References: <874j24kqk8.fsf@gnu.org> Date: Thu, 23 Jan 2025 23:58:51 +0100 Message-ID: <87v7u5kuhg.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello, > > Tomas Volf <~@wolfsden.cz> skribis: > >> * guix/gexp.scm (computed-file): Set LANG to C.UTF-8 by default. >> (compiled-modules): Try to `setlocale'. >> (gexp->script), (gexp->file): New `locale' argument defaulting to C.UTF-= 8. >> (text-file*): Set output port encoding to UTF-8. >> * doc/guix.texi (G-Expressions)[computed-file]: Document the changes. U= se >> @var. Document #:guile. >> [gexp->script]: Document #:locale. Fix default value for #:target. >> [gexp->file]: Document #:locale, #:system and #:target. >> >> Change-Id: Ib323b51af88a588b780ff48ddd04db8be7c729fb > > [...] > >> (define* (computed-file name gexp >> - #:key guile (local-build? #t) (options '())) >> + #:key >> + guile >> + (local-build? #t) >> + (options '(#:env-vars (("LANG" . "C.UTF-8"))))) > > I=E2=80=99d suggest LC_CTYPE (or LC_ALL?) rather than LANG. Oh, yeah, you are right, after reading the specification (and verifying Guile takes the variable into account), LC_CTYPE seems like a better fit. > > Also, what about making it the default for the #:env-vars of > =E2=80=98gexp->derivation=E2=80=99? That way it wouldn=E2=80=99t need to= be repeated in several > places. I *think* the original motivation was to keep the gexp->derivation as impartial as possible, since I do not know what people are using it for. But it is some time since I wrote this, so I am not fully sure. There are few downsides. Testing any changes now takes a long time since I need to do full bootstrap due to changing gexp->derivation and there are (I presume new and harmless) warnings `warning: failed to install locale: Invalid argument' during the bootstrap. But the change itself is much more localized now and the Unicode support more likely to "just work" for any new gexp forms added in the future. So maybe you are right and it is a right way. Anyway, I followed the suggestion and v2 moves the LC_CTYPE setting to gexp->derivation. The test script from the commit message still (after many hours of bootstrapping) works. > >> @@ -1700,6 +1703,9 @@ (define* (compiled-modules modules >> (system base target) >> (system base compile)) >> >> + ;; Best effort. The locale is not installed in all contexts. >> + (false-if-exception (setlocale LC_ALL "C.UTF-8")) > > Sounds good. I would make it a separate patch. Somewhat done. I have made it a separate commit, but still included in v2. > > s/in all contexts/when cross-compiling/ Interesting, I have modified the comment, however would you be willing to expand on this a bit? Why is the C.UTF-8 locale not available when cross-compiling? The Guile running this script runs on the build host, using build host's glibc and build host's locale definitions no? So I assumed the locale *should* be available. I feel like I am missing something fundamental about how Guix works here. > >> @@ -1990,7 +1996,8 @@ (define* (gexp->script name exp >> #:key (guile (default-guile)) >> (module-path %load-path) >> (system (%current-system)) >> - (target 'current)) >> + (target 'current) >> + (locale "C.UTF-8")) > > I would remove this argument and instead add an explicit, hard-coded: > > (set-port-encoding! port "UTF-8") > > in the body of =E2=80=98call-with-output-file=E2=80=99 here, just like yo= u did below. Done. > >> (define* (text-file* name #:rest text) >> "Return as a monadic value a derivation that builds a text file conta= ining >> @@ -2108,6 +2119,7 @@ (define* (text-file* name #:rest text) >> (define builder >> (gexp (call-with-output-file (ungexp output "out") >> (lambda (port) >> + (set-port-encoding! port "UTF-8") >> (display (string-append (ungexp-splicing text)) port))))) > > LGTM. This can be moved to a separate file. By "separate file" you mean separate patch and/or commit? > > How does that sound? > > Apologies for not replying earlier! No worries, thank you for finding the time to look at this. ^_^ The v2 is much smaller. Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmeSyasOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/waleHw//dg7QGM4U7CrbiIqVLRmElchNc76QmQGShIZt rYq0JFHYYU3EPO8fDA+HOhifOzrh8q/uQzb6MRdiKDfYVVAuZUMSFlD8rWyP9pzA ABt5WOn9qkAy/+ABu45jB7FWO9h0mYlR0Wpel37/KZsBzcj/iUZXVYjS2DsoqITa uKEf3EnRBmKIfOzoZk1/F1yZa8lzao5KFpXO68aRuepXV10pYeUfyRkbfq86n4Uo 26wv10GcHosoOMSObNXpZMytPnar+C5hTxIIGrIHcYgruizudYxokLewnT10pGmS AoXdOhulSjFfE/7Bcq7gNPt/61X9iV8jnAgyo5jY8ahduKLLF41S6ljxUzSsyua3 6cOspToH4aVEBakx83VpgwM56t116ApRxfcVyrChDnN6YpRx/76FrCjh036VhumV ANREsCw6rE3LIKH8vRRR01NwV4TrPcyPJ8Z8dt/bKGHg8wwR4LrIOa/ebC44rLyz 5oX0IEiup18Twzjj5F0iXWD9rGUDwUZl1h3JgNJimZKy/S1CjsgIv5y4yhh10h6C I0U3ZkhLkpxEtxhCpS7tsn03ps+ZkytaYrEpSzwrrmgm+973px6XA16B+KCOndGe l3+6Au5B/k11YH5RfgAR9fqYhiLoM9bLlZwvijqAJIAYFkEo81neUZl1cC2T5mdd 66BQR7w= =vbwv -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jan 2025 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: Josselin Poiret , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Florian Pelz , 73660@debbugs.gnu.org, Christopher Baines Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17377281968194 (code B ref 73660); Fri, 24 Jan 2025 14:17:02 +0000 Received: (at 73660) by debbugs.gnu.org; 24 Jan 2025 14:16:36 +0000 Received: from localhost ([127.0.0.1]:44278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbKU6-000285-Tq for submit@debbugs.gnu.org; Fri, 24 Jan 2025 09:16:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43172) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tbKU3-00027j-11 for 73660@debbugs.gnu.org; Fri, 24 Jan 2025 09:16:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbKTw-0001K7-BK; Fri, 24 Jan 2025 09:16:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=BryYe3qhRTSgRWiguV1yh+ZX3LGTcDoEumulH2AhvcU=; b=liIXpk5CCMRJ7qWAnrAW hcFmW2h/WDaOq5Ki4aKIZtk+Vxc1WQo90UGOMYivvDCEAWQs2fZPoNjO5MrhD0WoLQ1G4Jl1qlGnq vkCgt3hd01smcUmdZHpp9iTCohbsyoirQFwpvrAMBB+OXTDAogPTgyQ/7Dsm0Dm81Vj745cpYgpft wlQMWEGxb5Tegn8Rn/eQYMMG/lZ0v3CWvuFzP46I9+atkmcunc5nIWaRbvAPW3+EGzx7k6XQKPX1B JY3hRAuI+HL2VmOY1gv6rG82U4MNYdsbffkCIrPaW8FZsEHzH1/3jxYXrOPzTzQMtBIzvapSToFyl JU4L7g2Da4vDiA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87v7u5kuhg.fsf@wolfsden.cz> (Tomas Volf's message of "Thu, 23 Jan 2025 23:58:51 +0100") References: <874j24kqk8.fsf@gnu.org> <87v7u5kuhg.fsf@wolfsden.cz> Date: Fri, 24 Jan 2025 15:16:19 +0100 Message-ID: <87jzakfgb0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Tomas! Tomas Volf <~@wolfsden.cz> skribis: > Anyway, I followed the suggestion and v2 moves the LC_CTYPE setting to > gexp->derivation. The test script from the commit message still (after > many hours of bootstrapping) works. Sounds good! >>> + ;; Best effort. The locale is not installed in all contexts. >>> + (false-if-exception (setlocale LC_ALL "C.UTF-8")) >> >> Sounds good. I would make it a separate patch. > > Somewhat done. I have made it a separate commit, but still included in > v2. > >> >> s/in all contexts/when cross-compiling/ > > Interesting, I have modified the comment, however would you be willing > to expand on this a bit? Why is the C.UTF-8 locale not available when > cross-compiling? The Guile running this script runs on the build host, > using build host's glibc and build host's locale definitions no? So I > assumed the locale *should* be available. I feel like I am missing > something fundamental about how Guix works here. See the =E2=80=98install-utf8-c-locale=E2=80=99 phase of =E2=80=98glibc=E2= =80=99: since there=E2=80=99s no =E2=80=98localedef=E2=80=99 program to use when cross-compiling, that phase= is a no-op. ;; FIXME: When cross-compiling, attempt to use ;; 'localedef' from the same libc version. (invoke ,(if (%current-target-system) "true" '(string-append bin "/localedef")) "--no-archive" "--prefix" locale "-i" "C" "-f" "UTF-8" (string-append locale "/C.UTF-8")) It=E2=80=99s a problem because then we cannot really assume that C.UTF-8 is *always* available, even though that was the goal (see .) AFAICS, the format is actually architecture-independent: --8<---------------cut here---------------start------------->8--- $ guix build -e '(@@ (gnu packages base) glibc-utf8-locales)' -s i686-linux /gnu/store/4v8xzpkkkzpkm6qmxjv1lcma69chdwkl-glibc-utf8-locales-2.39 $ guix build -e '(@@ (gnu packages base) glibc-utf8-locales)'=20 /gnu/store/f3kpp3dh25893y79n32qlqqiwb5my4zg-glibc-utf8-locales-2.39 $ diff -r /gnu/store/4v8xzpkkkzpkm6qmxjv1lcma69chdwkl-glibc-utf8-locales-2.= 39/lib/locale/2.39/C.utf8 /gnu/store/f3kpp3dh25893y79n32qlqqiwb5my4zg-glib= c-utf8-locales-2.39/lib/locale/2.39/C.utf8 $ echo $? 0 $ guix build -e '(@@ (gnu packages base) glibc-utf8-locales)' -s aarch64-li= nux /gnu/store/0i1brwncg9rpf7pvh9hs5vrchmfb3c9q-glibc-utf8-locales-2.39 $ guix build -e '(@@ (gnu packages base) glibc-utf8-locales)' -s armhf-linux /gnu/store/8x26ik4jlvljcnx1jhfd83r5lyx04d15-glibc-utf8-locales-2.39 $ diff -r /gnu/store/4v8xzpkkkzpkm6qmxjv1lcma69chdwkl-glibc-utf8-locales-2.= 39/lib/locale/2.39/C.utf8 /gnu/store/0i1brwncg9rpf7pvh9hs5vrchmfb3c9q-glib= c-utf8-locales-2.39/lib/locale/2.39/C.utf8 $ echo $? 0 $ diff -r /gnu/store/4v8xzpkkkzpkm6qmxjv1lcma69chdwkl-glibc-utf8-locales-2.= 39/lib/locale/2.39/C.utf8 /gnu/store/8x26ik4jlvljcnx1jhfd83r5lyx04d15-glib= c-utf8-locales-2.39/lib/locale/2.39/C.utf8 $ echo $? 0 --8<---------------cut here---------------end--------------->8--- So it might work by replacing "true" by "localedef" in this phase (and we could do that on =E2=80=98master=E2=80=99), under the assumption that the cross-compiled libc and the one that provides the =E2=80=98localedef=E2=80= =99 command are the same version, which is usually the case. We should do that. >>> (define* (text-file* name #:rest text) >>> "Return as a monadic value a derivation that builds a text file cont= aining >>> @@ -2108,6 +2119,7 @@ (define* (text-file* name #:rest text) >>> (define builder >>> (gexp (call-with-output-file (ungexp output "out") >>> (lambda (port) >>> + (set-port-encoding! port "UTF-8") >>> (display (string-append (ungexp-splicing text)) port))))) >> >> LGTM. This can be moved to a separate file. > > By "separate file" you mean separate patch and/or commit? Yes. Thanks! Ludo=E2=80=99. From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH v2 1/3] gexp: Improve support of Unicode characters. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jan 2025 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , 73660@debbugs.gnu.org, Christopher Baines Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17377282748332 (code B ref 73660); Fri, 24 Jan 2025 14:18:02 +0000 Received: (at 73660) by debbugs.gnu.org; 24 Jan 2025 14:17:54 +0000 Received: from localhost ([127.0.0.1]:44283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbKVO-0002AJ-E8 for submit@debbugs.gnu.org; Fri, 24 Jan 2025 09:17:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59406) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tbKVL-0002A2-Oh for 73660@debbugs.gnu.org; Fri, 24 Jan 2025 09:17:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbKVF-0001Po-4P; Fri, 24 Jan 2025 09:17:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=nfWaca3rsNu40pF8ga9ZQ5K6hYtCmVSITf6rQzctFLc=; b=GELGdhyqg5/kzqmJe0b2 YXw5vPgU42RrkpurcN0APIcHzOU3GvqruXV9dY+5OjGZlnaWEOhEWhUspcVJpmzd5qZYRsy4CJapJ 2bKDpOjCgVOdgprOlIA/2TYdTY/9d5i0Dagb5KJOlyGKF3FnsQAFKNq3Ewffg9pV/5G5Q3KuY75mM bwtRzQ0QCoMjNRv+zo5tt4oAWAhd35Qo8BrWK6PDcBweYVc/95Um2WTBQp56Kt3kxFGSkBHm9uX2n zrGSCOQ0ytHcdrYR4Vx1Xrbxf6trMxc4h7QKRG6ka+YzDZSw5ixBmEIQCIJcF107aqig2fy+zTg0v YYPN0OPBCudlOg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> (Tomas Volf's message of "Thu, 23 Jan 2025 23:57:06 +0100") References: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> Date: Fri, 24 Jan 2025 15:17:41 +0100 Message-ID: <87frl8fg8q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) The 3 patches LGTM! Janneke, I think you=E2=80=99re ready to merge them? Ludo=E2=80=99. From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH] gexp: Improve support of Unicode characters. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jan 2025 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: Josselin Poiret , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Florian Pelz , 73660@debbugs.gnu.org, Christopher Baines Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.173773494730679 (code B ref 73660); Fri, 24 Jan 2025 16:10:02 +0000 Received: (at 73660) by debbugs.gnu.org; 24 Jan 2025 16:09:07 +0000 Received: from localhost ([127.0.0.1]:46654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbMEy-0007yh-1G for submit@debbugs.gnu.org; Fri, 24 Jan 2025 11:09:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44780) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tbMEu-0007y9-QE for 73660@debbugs.gnu.org; Fri, 24 Jan 2025 11:09:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbMEj-0001QU-V4; Fri, 24 Jan 2025 11:08:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=MXG/3ybVoxMGUy3uDOkoODtuZVFwz7o+RjCx2FOVvO4=; b=phCuhQIcogJ4SErEnU9f DY67tPTx/RUsV5z4F4jl5EGH5v1awAB3CkmQrm8Lu1vaLRIbs9eH6WH3sp2hAunZxbOIHBdRhsaNZ NAaO5jIi73asm01mj143NymYG7MKxrW1oQCuGvNuAh2zop4enu1cXL0KlSXImEEyb++ksoGsTSLVa /ycMG4f7bj6NN+WzJiSnmTgJ7Q2u/IkXwzUz31VHw1KNDZB8RyFEN55W0PS+mo+L5NohU3HjvemR6 NSIG/noeu3YLNi9R23ubron7zoc5eqO75ExhcPipNyjwG9K251FI0q1S+P0TSvRWGFbfzF/G1n1o9 f0lgYAAHvqPHKA==; From: Janneke Nieuwenhuizen In-Reply-To: <87v7u5kuhg.fsf@wolfsden.cz> (Tomas Volf's message of "Thu, 23 Jan 2025 23:58:51 +0100") Organization: AvatarAcademy.nl References: <874j24kqk8.fsf@gnu.org> <87v7u5kuhg.fsf@wolfsden.cz> X-Url: http://AvatarAcademy.nl Date: Fri, 24 Jan 2025 17:08:33 +0100 Message-ID: <87ldv0b3em.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tomas Volf writes: Hello Tomas, Thank you for v2. On IRC, civodul writes --8<---------------cut here---------------start------------->8--- janneke: re gexp/Unicode, the 3 patches LGTM so yes, feel free to apply them! [15:18] --8<---------------cut here---------------end--------------->8--- so I'm applied this series to a freshly rebased core-packages-team. The only changes I made was to add --8<---------------cut here---------------start------------->8--- diff --git a/guix/gexp.scm b/guix/gexp.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2019, 2020 Mathieu Othacehe ;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; Copyright =C2=A9 2021, 2022 Maxime Devos +;;; Copyright =C2=A9 2025 Tomas Volf <~@wolfsden.cz> ;;; ;;; This file is part of GNU Guix. ;;; --8<---------------cut here---------------end--------------->8--- /update your copyright --8<---------------cut here---------------start------------->8--- diff --git a/doc/guix.texi b/doc/guix.texi @@ -123,7 +123,7 @@ Copyright @copyright{} 2023 Thomas Ieong@* Copyright @copyright{} 2023 Saku Laesvuori@* Copyright @copyright{} 2023 Graham James Addis@* -Copyright @copyright{} 2023, 2024 Tomas Volf@* +Copyright @copyright{} 2023, 2024, 2025 Tomas Volf@* Copyright @copyright{} 2024 Herman Rimm@* Copyright @copyright{} 2024 Matthew Trzcinski@* Copyright @copyright{} 2024 Richard Sent@* --8<---------------cut here---------------end--------------->8--- Thank you! Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From unknown Mon Jun 23 02:23:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#73660] [PATCH v2 1/3] gexp: Improve support of Unicode characters. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jan 2025 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73660 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tomas Volf <~@wolfsden.cz>, Tobias Geerinckx-Rice , 73660@debbugs.gnu.org, Christopher Baines Received: via spool by 73660-submit@debbugs.gnu.org id=B73660.17377366053685 (code B ref 73660); Fri, 24 Jan 2025 16:37:02 +0000 Received: (at 73660) by debbugs.gnu.org; 24 Jan 2025 16:36:45 +0000 Received: from localhost ([127.0.0.1]:46705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbMfk-0000xN-VW for submit@debbugs.gnu.org; Fri, 24 Jan 2025 11:36:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36126) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tbMfh-0000x3-BK for 73660@debbugs.gnu.org; Fri, 24 Jan 2025 11:36:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbMfX-00071R-DP; Fri, 24 Jan 2025 11:36:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=a5ol4YfRzNvv7K1B77WTZunnilEZIp2vSddnZWOVTAw=; b=PSqh4RCbRY9t+8y+LJue EI1ak7mtz/WhnyqLmOTVo7e7gONdNrBlgRxUcgXADruBKB/k9UgLxtXK2AAtX3t4fEgK2Oa0Qw0pd 3+Q3l4AN6S4xRRZc8C2o2CKI16H74FfPX958U6+5ANcOQH4zQuFBvcN2/lgLRVs+Me5Wrs3VcOIhL VXoEtAb9fS/nqA3uzBexhE6zr25yvDdegM940AIMJKF+qs/Xah5WLgFcMSSKcbea7Q2OHOzOE6zSA yZQZXJf8ZvNvsvb/19BgQtv56BhD5DCYP6v+Y6F4I7ROnOsbmtqWiq8MRPCwNQ46jNlJ6Np5dx1Xc 7nreDe+eoexX8Q==; From: Janneke Nieuwenhuizen In-Reply-To: <87frl8fg8q.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 24 Jan 2025 15:17:41 +0100") Organization: AvatarAcademy.nl References: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> <87frl8fg8q.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 24 Jan 2025 17:36:04 +0100 Message-ID: <87h65ob24r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > The 3 patches LGTM! > > Janneke, I think you=E2=80=99re ready to merge them? Yes thanks, done! I took my time rebasing core-packages-team first. Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From unknown Mon Jun 23 02:23:15 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tomas Volf <~@wolfsden.cz> Subject: bug#73660: closed (Re: [bug#73660] [PATCH v2 1/3] gexp: Improve support of Unicode characters.) Message-ID: References: <87msfffz5i.fsf@gmail.com> X-Gnu-PR-Message: they-closed 73660 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 73660@debbugs.gnu.org Date: Sat, 25 Jan 2025 01:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1737769322-22948-1" This is a multi-part message in MIME format... ------------=_1737769322-22948-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #73660: [PATCH] gexp: Improve support of Unicode characters. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 73660@debbugs.gnu.org. --=20 73660: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D73660 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1737769322-22948-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 73660-done) by debbugs.gnu.org; 25 Jan 2025 01:41:52 +0000 Received: from localhost ([127.0.0.1]:47854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbVBH-0005xh-SM for submit@debbugs.gnu.org; Fri, 24 Jan 2025 20:41:52 -0500 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:58595) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tbVBF-0005xO-6L for 73660-done@debbugs.gnu.org; Fri, 24 Jan 2025 20:41:49 -0500 Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-467a3f1e667so16812571cf.0 for <73660-done@debbugs.gnu.org>; Fri, 24 Jan 2025 17:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737769303; x=1738374103; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CE4iettPzowsvcrb70OJbREKlwu4QN5rGJFTo2MCU+U=; b=j9jqnFKL6hinYHN0vDaQJknv7CFp8u2lVQxmc89mgw8Ctd0bzV45K//fgTwm0W090t H9VZpvIQ6U103rr+oocNLp78DG+lPORJ7CFtLWcrDKn4cXkM/OZzfQNmGujyzlgfDpzm Se8enwhYBMCM79FivNr2GlhzP4Wux+yt+l/2GBTnIP1nQQPS8fePV7Novu8VvZ9evxSO grLXkvqIwtGfvSaWNeyNRiyMslYcR48D9aqskW5a6rcF1KBwQgStp7gFzN0Q5ecZZXMS 7kc2Vjd94aeh4t7Jgf0yXKWm+C5n5Evj9tVNDY/LBgiid5gq4xmsTvQ8pRF+rRy1Ou6v 1SRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737769303; x=1738374103; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CE4iettPzowsvcrb70OJbREKlwu4QN5rGJFTo2MCU+U=; b=OU2xvHSvpwGw4K7FFafOS7ma0p9Q28A+z0hR+1x/L/zKhJbrXB1bJ1o5Rn4C/P+Jpk u31BZ6oTthq1ZPyTlT/looeqil1xIp1hLrCDM7SHrEakckskgg6l16xtpIWJqDkgXQwS 5hlU+r+wdMB4qgpxmPAjGQYuvNKuL0BYO21YhjxcmBmsIbxkMnMZLCjGzENEpRFwNc0I H0fT1BfEGo7K2mqo/+lkHchvT5YRU5z5nm4nyBiCm9TiXUqNl2PulJCIBm2DmXJG/QrD fBxAEuoUfx47cFe5w4F0vX2Rq6GLCROQxhoJhqhLhFXsg+FHoPHDf/AzXyGxr+NbzpT2 kU4w== X-Forwarded-Encrypted: i=1; AJvYcCXNUMURlClV1oZ+AXuqYXqD2E7j4qOfFKo3PlsxQrVlMVnfPC/kw13DDhZMBiQg9CgymcPkM5asIUg7@debbugs.gnu.org X-Gm-Message-State: AOJu0YxpeJpBIQnb/O+xtIDkHqjgpthi7Le7G1+V+0ROWzJGfHTLA68X bg/H2oANuog1s6VUFbizwscC0ZyjRBWMx9tmzM/1Nw4VcwptI9Go X-Gm-Gg: ASbGncvyFORqEnhePU00BVw6DosD0X42z7ZEbTmirWfT3ZIp3W1Xh7My6SMlJ3w7enA yx6PdllnrGTHGuGs1ZzSa46BF9yC4H6nMhdXA1yJsw3ATHNjJ83jnJUfD0diWAeljH6L48irW1/ LpJYGcch6Ayo0r+PwxFUiLAHFoIVFlr2pcTIGla2cAY70++qBDpW4sR5gzlwHmck/HRCAQnDn1Y Pm54n+FcbGWjPkG5+Pn1rco9PlB7WBC9GSM1JT921HWaoq+nN4+h5GzXeNCQVXRngpWITrZdr4n mimiJt8OyB/fWUb37UE2ZSx1jg== X-Google-Smtp-Source: AGHT+IHnEQdgYZIYVpRatl4uPUOaIT9lNEo3NWiwSpgDmcB5/IAsO/aJ89QmQQykudziZDwKi9MQdA== X-Received: by 2002:ac8:5419:0:b0:46e:23dc:97cb with SMTP id d75a77b69052e-46e23dca6a0mr282624071cf.10.1737769303549; Fri, 24 Jan 2025 17:41:43 -0800 (PST) Received: from terra (vps-6234970c.vps.ovh.ca. [51.222.13.224]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e2057a88e1sm13936196d6.89.2025.01.24.17.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 17:41:42 -0800 (PST) From: Maxim Cournoyer To: Janneke Nieuwenhuizen Subject: Re: [bug#73660] [PATCH v2 1/3] gexp: Improve support of Unicode characters. In-Reply-To: <87h65ob24r.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Fri, 24 Jan 2025 17:36:04 +0100") References: <644ead9c6d22fae4826392df175aada156fe6dbf.1737673028.git.~@wolfsden.cz> <87frl8fg8q.fsf@gnu.org> <87h65ob24r.fsf@gnu.org> Date: Sat, 25 Jan 2025 10:41:29 +0900 Message-ID: <87msfffz5i.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73660-done Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tomas Volf <~@wolfsden.cz>, Tobias Geerinckx-Rice , 73660-done@debbugs.gnu.org, Christopher Baines , Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Janneke Nieuwenhuizen writes: > Ludovic Court=C3=A8s writes: > >> The 3 patches LGTM! >> >> Janneke, I think you=E2=80=99re ready to merge them? > > Yes thanks, done! I took my time rebasing core-packages-team first. Thanks, closing this issue then :-) --=20 Thanks, Maxim ------------=_1737769322-22948-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Oct 2024 15:43:06 +0000 Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxTPV-0000I2-DC for submit@debbugs.gnu.org; Sun, 06 Oct 2024 11:43:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:37454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sxTPR-0000HP-PR for submit@debbugs.gnu.org; Sun, 06 Oct 2024 11:43:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sxTPL-00060P-CT for guix-patches@gnu.org; Sun, 06 Oct 2024 11:42:55 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sxTPI-00021n-PL for guix-patches@gnu.org; Sun, 06 Oct 2024 11:42:55 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 5B6FA31EFF6; Sun, 6 Oct 2024 15:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1728229370; bh=ZBRaB9MJIRKXeghlOajWnO1m7Ic2O5xdKKnrOZEl82o=; h=From:To:Cc:Subject:Date; b=pxMmK+ci/oq0O5IPT1Kugz/stNfI33uhC/FXYlBV5JEZWMM7g4MRbLeD9QMBwmsBG nLP6bdeS2WD5YlabEDLgV/mMRxDIVoKgANcAroK+BtAMq5pOUf4vNZXcLtNfBskg8V aBPP95JdxMQEvdxpDvsUVEBd7HfHWYR8a8G5XU9lf1pHitVu+1A2yXXbUZ94pKVCXt vKMschrBc4oxw0Br+MQGE72pwDtyXB6aZ0q4fZOwLKZvZYrFidnjccohMfbaz3KY4O 9nzsoQb5ElQ4moOsRVL221XqrEaId5Gc+ySyb/9GTn4e0oy2oFdEj2srbrJLAH5Hn9 UPt1oBP3m4pqtYVBJw65em8jwupCjxK9ok9NfxCC/M0rQImrUi6ojm1PEln7kte4BL kS2gAhSnDaL7Ix2X1HhQ8nvJGRy2kJyF0qqhWXrPpZ0djFgxhWfw82Bk9BtHbAXn0U UCZ5179pjqKoZ/NEA8aK5MiH0J5UxIAhdaGfd+LkvokuDvqZpL36PExUN9Wr3qKXj3 oMTC6VsYdviJUvd8VqMHKIx7xitugQnGVnd+soI8rcnSCmxgy1O2WCHjH52YKwlsRx XRmBZVD4IN1thu9c/ICuYy6SHxvx9aHVQ3ZrpsjVVBgjZ9oU0HrleOGPnB93eNHrOT kg4J3K5U9MUkl/5PL3Ykl4Gw= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [146.70.134.132]) by wolfsden.cz (Postfix) with ESMTPSA id 8964A320A72; Sun, 6 Oct 2024 15:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1728229369; bh=ZBRaB9MJIRKXeghlOajWnO1m7Ic2O5xdKKnrOZEl82o=; h=From:To:Cc:Subject:Date; b=WCbiWurtPUZ5dm+2+5Fre9w34Vz5uoQowSTSO60nyHEGfykoT3x3yGt1keZoZo4ze omc/s7EwPV5aUZARxn9xOIb4AK5iBQ6+62o3gadUKdyZMKhq4NRJh6ufDM9BmEeDF/ faFr9mjat9OObOqEJ768Fa/PFkIyulMVx+w0KO49H6vJRVcxZaj0g2wsQ1PU+Mj8gg G9rQA5RpTPNAzEdcXmqGxJCKuDeFeGjRfY/pxkOq6PzufjMkU/KIzn5cypo4gCREbI kyl969x/thG26O6sB+LkwWGiw9gD6p2IiYR5a012hyM6xnQH9HvhLFswFz1Kqnd3dO F5BQ3OdUmBmEGcf/wcicAOG757B4bs0KJpAif22WnvtYtmANek6aCMCpUskuK/+uf4 lLqNA83X76i+GrUW1QBPlBQcOlmdpokNqYbTIe22cxr2sYc8g58UMYa71D44HGDmBs KbstWIwvli7Y6L3pbt95qDbEYh2ZjFwBY+pXZ3aBhT32olLq0Ahq8CFeE2PrMEIXJM WrLVH7ZnVptd7T6BRWRcYEl0X3/Lu/72k1SBQj+0SigGWaJ1cMxszvPuT6iJlwtgS3 Dj8e8Lq3qIgZMwzzW9r+N2FtChf2kRlJCe6dKOhUoeqGrc83wgcmPbRVzThXN1PQOl hUgHXqt4yR+IDC0O9BlOVF68= From: Tomas Volf <~@wolfsden.cz> To: guix-patches@gnu.org Subject: [PATCH] gexp: Improve support of Unicode characters. Date: Sun, 6 Oct 2024 17:42:26 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Support for non-ASCII characters was mixed. Some gexp forms did support them, while others did not. Combined with current value for %default-port-conversion-strategy, that sometimes led to unpleasant surprises. For example: (scheme-file "utf8" #~(with-output-to-file #$output (λ _ (display "猫")))) Was written to the store as: ((? _ (display "\u732b"))) No, that is not font issue on your part, that is an actual #\? instead of the lambda character. Which, surprisingly, does not do what it should when executed. The solution is to switch to C.UTF-8 locale where possible, since it is now always available. Or to explicitly set the port encoding. No tests are provided, since majority of tests/gexp.scm use guile in version 2, and it tends to work under it. The issues occur mostly with guile 3. I did test it locally using: #!/bin/sh set -eu set -x [ -f guix.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; } [ -f gnu.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; } cat >猫.scm <<'EOF' (define-module (猫) #:export (say)) (define (say) "nyaaaa~~~~!") EOF mkdir -p dir-with-utf8-file cp 猫.scm dir-with-utf8-file/ cat >repro.scm <<'EOF' (use-modules (guix build utils) (guix derivations) (guix gexp) (guix store) (ice-9 ftw) (ice-9 textual-ports)) (define cat "猫") (define (drv-content drv) (call-with-input-file (derivation->output-path drv) get-string-all)) (define (out-content out) (call-with-input-file out get-string-all)) (define (drv-listing drv) (scandir (derivation->output-path drv))) (define (dir-listing dir) (scandir dir)) (define-macro (test exp lower? report) (let ((type (car exp))) `(false-if-exception (let ((drv (with-store %store (run-with-store %store (,(if lower? lower-object identity) ,exp))))) (format #t "~%~a:~%" ',type) (when (with-store %store (build-derivations %store (list drv))) (format #t "~a~%" (,report drv))))))) (test (computed-file "utf8" #~(with-output-to-file #$output (λ _ (display #$cat)))) #t drv-content) (test (program-file "utf8" #~((λ _ (display #$cat)))) #t drv-content) (test (scheme-file "utf8" #~((λ _ (display #$cat)))) #t drv-content) (test (text-file* "utf8" cat cat cat) #f drv-content) (test (compiled-modules '((猫))) #f drv-listing) (test (file-union "utf8" `((,cat ,(plain-file "utf8" cat)))) #t drv-listing) ;;; No fix needed: (test (imported-modules '((猫))) #f dir-listing) (test (local-file "dir-with-utf8-file" #:recursive? #t) #t dir-listing) (test (plain-file "utf8" cat) #t out-content) (test (mixed-text-file "utf8" cat cat cat) #t drv-content) (test (directory-union "utf8" (list (local-file "dir-with-utf8-file" #:recursive? #t))) #t dir-listing) EOF guix shell -CWN -D guix glibc-locales -- \ env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm Before this commit, the output is: + '[' -f guix.scm ']' + '[' -f gnu.scm ']' + cat + mkdir -p dir-with-utf8-file + cp 猫.scm dir-with-utf8-file/ + cat + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm computed-file: ? program-file: #!/gnu/store/mfkz7fvlfpv3ppwbkv0imb19nrf95akf-guile-3.0.9/bin/guile --no-auto-compile !# ((? _ (display "\u732b"))) scheme-file: ((? _ (display "\u732b"))) text-file*: ??? compiled-modules: building path(s) `/gnu/store/ay3jifyvliigfgnz67jf0kgngzpya5a5-module-import-compiled' Backtrace: 5 (primitive-load "/gnu/store/rn7b0dq6iqfmmqyqzamix2mjmfy?") In ice-9/eval.scm: 619:8 4 (_ #f) In srfi/srfi-1.scm: 460:18 3 (fold # ?) In ice-9/eval.scm: 245:16 2 (_ #(#(#) # ?)) In ice-9/boot-9.scm: 1982:24 1 (_ _) In unknown file: 0 (stat "./???.scm" #) ERROR: In procedure stat: In procedure stat: No such file or directory: "./???.scm" builder for `/gnu/store/dxg87135zcd6a1c92dlrkyvxlbhfwfld-module-import-compiled.drv' failed with exit code 1 file-union: (. .. ?) imported-modules: (. .. 猫.scm) local-file: (. .. 猫.scm) plain-file: 猫 mixed-text-file: 猫猫猫 directory-union: (. .. 猫.scm) Which I think you will agree is far from optimal. After my fix the output changes to: + '[' -f guix.scm ']' + '[' -f gnu.scm ']' + cat + mkdir -p dir-with-utf8-file + cp 猫.scm dir-with-utf8-file/ + cat + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm computed-file: 猫 program-file: #!/gnu/store/8kbmn359jqkgsbqgqxnmiryvd9ynz8w7-guile-3.0.9/bin/guile --no-auto-compile !# ((λ _ (display "猫"))) scheme-file: ((λ _ (display "猫"))) text-file*: 猫猫猫 compiled-modules: (. .. 猫.go) file-union: (. .. 猫) imported-modules: (. .. 猫.scm) local-file: (. .. 猫.scm) plain-file: 猫 mixed-text-file: 猫猫猫 directory-union: (. .. 猫.scm) Which is actually what the user would expect. I also added missing arguments to the documentation. * guix/gexp.scm (computed-file): Set LANG to C.UTF-8 by default. (compiled-modules): Try to `setlocale'. (gexp->script), (gexp->file): New `locale' argument defaulting to C.UTF-8. (text-file*): Set output port encoding to UTF-8. * doc/guix.texi (G-Expressions)[computed-file]: Document the changes. Use @var. Document #:guile. [gexp->script]: Document #:locale. Fix default value for #:target. [gexp->file]: Document #:locale, #:system and #:target. Change-Id: Ib323b51af88a588b780ff48ddd04db8be7c729fb --- doc/guix.texi | 11 +++++++---- guix/gexp.scm | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 52e36e4354..683ba2f44b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12270,7 +12270,9 @@ G-Expressions This is the declarative counterpart of @code{text-file}. @end deffn -@deffn {Procedure} computed-file name gexp [#:local-build? #t] [#:options '()] +@deffn {Procedure} computed-file @var{name} @var{gexp} @ + [#:local-build? #t] [#:guile] @ + [#:options '(#:env-vars (("LANG" . "C.UTF-8")))] Return an object representing the store item @var{name}, a file or directory computed by @var{gexp}. When @var{local-build?} is true (the default), the derivation is built locally. @var{options} is a list of @@ -12281,7 +12283,7 @@ G-Expressions @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} @ [#:guile (default-guile)] [#:module-path %load-path] @ - [#:system (%current-system)] [#:target #f] + [#:system (%current-system)] [#:target 'current] [#:locale "C.UTF-8"] Return an executable script @var{name} that runs @var{exp} using @var{guile}, with @var{exp}'s imported modules in its search path. Look up @var{exp}'s modules in @var{module-path}. @@ -12318,8 +12320,9 @@ G-Expressions @deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @ [#:set-load-path? #t] [#:module-path %load-path] @ - [#:splice? #f] @ - [#:guile (default-guile)] + [#:splice? #f] [#:guile (default-guile)] @ + [#:system (%current-system)] [#:target 'current] @ + [#:locale "C.UTF-8"] Return a derivation that builds a file @var{name} containing @var{exp}. When @var{splice?} is true, @var{exp} is considered to be a list of expressions that will be spliced in the resulting file. diff --git a/guix/gexp.scm b/guix/gexp.scm index e44aea6420..c8aba91779 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -597,7 +597,10 @@ (define-record-type (options computed-file-options)) ;list of arguments (define* (computed-file name gexp - #:key guile (local-build? #t) (options '())) + #:key + guile + (local-build? #t) + (options '(#:env-vars (("LANG" . "C.UTF-8"))))) "Return an object representing the store item NAME, a file or directory computed by GEXP. When LOCAL-BUILD? is #t (the default), it ensures the corresponding derivation is built locally. OPTIONS may be used to pass @@ -1700,6 +1703,9 @@ (define* (compiled-modules modules (system base target) (system base compile)) + ;; Best effort. The locale is not installed in all contexts. + (false-if-exception (setlocale LC_ALL "C.UTF-8")) + (define modules (getenv "modules")) @@ -1990,7 +1996,8 @@ (define* (gexp->script name exp #:key (guile (default-guile)) (module-path %load-path) (system (%current-system)) - (target 'current)) + (target 'current) + (locale "C.UTF-8")) "Return an executable script NAME that runs EXP using GUILE, with EXP's imported modules in its search path. Look up EXP's modules in MODULE-PATH." (mlet* %store-monad ((target (if (eq? target 'current) @@ -2033,7 +2040,8 @@ (define* (gexp->script name exp ;; These derivations are not worth offloading or ;; substituting. #:local-build? #t - #:substitutable? #f))) + #:substitutable? #f + #:env-vars `(("LANG" . ,locale))))) (define* (gexp->file name exp #:key (guile (default-guile)) @@ -2041,7 +2049,8 @@ (define* (gexp->file name exp #:key (module-path %load-path) (splice? #f) (system (%current-system)) - (target 'current)) + (target 'current) + (locale "C.UTF-8")) "Return a derivation that builds a file NAME containing EXP. When SPLICE? is true, EXP is considered to be a list of expressions that will be spliced in the resulting file. @@ -2081,7 +2090,8 @@ (define* (gexp->file name exp #:key #:local-build? #t #:substitutable? #f #:system system - #:target target) + #:target target + #:env-vars `(("LANG" . ,locale))) (gexp->derivation name (gexp (call-with-output-file (ungexp output) @@ -2098,7 +2108,8 @@ (define* (gexp->file name exp #:key #:local-build? #t #:substitutable? #f #:system system - #:target target)))) + #:target target + #:env-vars `(("LANG" . ,locale)))))) (define* (text-file* name #:rest text) "Return as a monadic value a derivation that builds a text file containing @@ -2108,6 +2119,7 @@ (define* (text-file* name #:rest text) (define builder (gexp (call-with-output-file (ungexp output "out") (lambda (port) + (set-port-encoding! port "UTF-8") (display (string-append (ungexp-splicing text)) port))))) (gexp->derivation name builder -- 2.46.0 ------------=_1737769322-22948-1--