1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

serialization: Rename ‘string’ to ‘utf8-string’.

This avoids name clash with the ‘string’ binding of core Guile.

* guix/serialization.scm <top level>: Change ‘string’ to ‘utf8-string’.
* guix/store.scm (valid-path?, hash-part->path):
(add-data-to-store, add-indirect-root): Adjust operation specification
accordingly.

Change-Id: Ibf7c571ac46689c2870a2c6db6a3632405d47544
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Ludovic Courtès
2025-11-20 17:38:00 +01:00
parent 0c1ea038e9
commit 132250beff
2 changed files with 9 additions and 9 deletions

View File

@@ -353,7 +353,7 @@ value."
(long-long read-long-long write-long-long)
(boolean read-boolean write-boolean)
(bytevector read-byte-string write-bytevector)
(string read-string write-string)
(utf8-string read-string write-string) ;avoid name clash with 'string'
(string-list read-string-list write-string-list)
(string-pairs read-string-pairs write-string-pairs)
(store-path read-store-path write-store-path)

View File

@@ -942,7 +942,7 @@ bytevector) as its internal buffer, and a thunk to flush this output port."
(define name
(operation (name args ...) docstring return ...)))
(define-operation (valid-path? (string path))
(define-operation (valid-path? (utf8-string path))
"Return #t when PATH designates a valid store item and #f otherwise (an
invalid item may exist on disk but still be invalid, for instance because it
is the result of an aborted or failed build.)
@@ -957,7 +957,7 @@ store directory (/gnu/store)."
(define hash-part->path
(let ((query-path-from-hash-part
(operation (query-path-from-hash-part (string hash))
(operation (query-path-from-hash-part (utf8-string hash))
#f
store-path)))
(lambda (server hash-part)
@@ -975,7 +975,7 @@ string). Return the empty string if no such path exists."
;; A memoizing version of `add-to-store', to avoid repeated RPCs with
;; the very same arguments during a given session.
(let ((add-text-to-store
(operation (add-text-to-store (string name) (bytevector text)
(operation (add-text-to-store (utf8-string name) (bytevector text)
(string-list references))
#f
store-path))
@@ -1054,10 +1054,10 @@ path."
(let ((port (store-connection-socket server))
(buffered (store-connection-output-port server)))
(write-value integer (operation-id add-to-store) buffered)
(write-value string basename buffered)
(write-value utf8-string basename buffered)
(write-value integer 1 buffered) ;obsolete, must be #t
(write-value boolean recursive? buffered)
(write-value string hash-algo buffered)
(write-value utf8-string hash-algo buffered)
(write-file file-name buffered #:select? select?)
(write-buffered-output server)
(let loop ((done? (process-stderr server)))
@@ -1168,10 +1168,10 @@ an arbitrary directory layout in the store without creating a derivation."
(let ((port (store-connection-socket server))
(buffered (store-connection-output-port server)))
(write-value integer (operation-id add-to-store) buffered)
(write-value string basename buffered)
(write-value utf8-string basename buffered)
(write-value integer 1 buffered) ;obsolete, must be #t
(write-value integer (if recursive? 1 0) buffered)
(write-value string hash-algo buffered)
(write-value utf8-string hash-algo buffered)
(write-file-tree basename buffered
#:file-type+size file-type+size
#:file-port file-port
@@ -1415,7 +1415,7 @@ potential roots that do not point to store items."
Return #t."
boolean)
(define-operation (add-indirect-root (string file-name))
(define-operation (add-indirect-root (utf8-string file-name))
"Make the symlink FILE-NAME an indirect root for the garbage collector:
whatever store item FILE-NAME points to will not be collected. Return #t on
success.