GNU bug report logs -
#61842
[PATCH] file-systems: Remove deprecated 'title' field helper procedures.
Previous Next
Reported by: Bruno Victal <mirai <at> makinata.eu>
Date: Mon, 27 Feb 2023 15:00:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61842 in the body.
You can then email your comments to 61842 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
ludo <at> gnu.org, guix-patches <at> gnu.org
:
bug#61842
; Package
guix-patches
.
(Mon, 27 Feb 2023 15:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Victal <mirai <at> makinata.eu>
:
New bug report received and forwarded. Copy sent to
ludo <at> gnu.org, guix-patches <at> gnu.org
.
(Mon, 27 Feb 2023 15:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/system/file-systems.scm (<file-system>): Change constructor name to 'file-system'.
(report-deprecation, device-expression, process-file-system-declaration, file-system): Remove macros.
(file-system-title): Remove procedure.
---
gnu/system/file-systems.scm | 69 +------------------------------------
1 file changed, 1 insertion(+), 68 deletions(-)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index f2eb2e0837..b236011100 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -42,7 +42,6 @@ (define-module (gnu system file-systems)
file-system?
file-system-device
file-system-device->string
- file-system-title ;deprecated
file-system-mount-point
file-system-type
file-system-needed-for-boot?
@@ -158,7 +157,7 @@ (define-syntax validate-file-system-flags
#'%validate-file-system-flags))))
;; File system declaration.
-(define-record-type* <file-system> %file-system
+(define-record-type* <file-system> file-system
make-file-system
file-system?
(device file-system-device) ; string | <uuid> | <file-system-label>
@@ -200,72 +199,6 @@ (define-record-type <file-system-label>
(format port "#<file-system-label ~s>"
(file-system-label->string obj))))
-(define-syntax report-deprecation
- (lambda (s)
- "Report the use of the now-deprecated 'title' field."
- (syntax-case s ()
- ((_ field)
- (let* ((source (syntax-source #'field))
- (file (and source (assq-ref source 'filename)))
- (line (and source
- (and=> (assq-ref source 'line) 1+)))
- (column (and source (assq-ref source 'column))))
- (format (current-error-port)
- "~a:~a:~a: warning: 'title' field is deprecated~%"
- file line column)
- #t)))))
-
-;; Helper for 'process-file-system-declaration'.
-(define-syntax device-expression
- (syntax-rules (quote label uuid device)
- ((_ (quote label) dev)
- (file-system-label dev))
- ((_ (quote uuid) dev)
- (if (uuid? dev) dev (uuid dev)))
- ((_ (quote device) dev)
- dev)
- ((_ title dev)
- (case title
- ((label) (file-system-label dev))
- ((uuid) (uuid dev))
- (else dev)))))
-
-;; Helper to interpret the now-deprecated 'title' field. Detect forms like
-;; (title 'label), remove them, and adjust the 'device' field accordingly.
-;; TODO: Remove this once 'title' has been deprecated long enough.
-(define-syntax process-file-system-declaration
- (syntax-rules (device title)
- ((_ () (rest ...) #f #f) ;no 'title' and no 'device' field
- (%file-system rest ...))
- ((_ () (rest ...) dev #f) ;no 'title' field
- (%file-system rest ... (device dev)))
- ((_ () (rest ...) dev titl) ;got a 'title' field
- (%file-system rest ...
- (device (device-expression titl dev))))
- ((_ ((title titl) rest ...) (previous ...) dev _)
- (begin
- (report-deprecation (title titl))
- (process-file-system-declaration (rest ...)
- (previous ...)
- dev titl)))
- ((_ ((device dev) rest ...) (previous ...) _ titl)
- (process-file-system-declaration (rest ...)
- (previous ...)
- dev titl))
- ((_ (field rest ...) (previous ...) dev titl)
- (process-file-system-declaration (rest ...)
- (previous ... field)
- dev titl))))
-
-(define-syntax-rule (file-system fields ...)
- (process-file-system-declaration (fields ...) () #f #f))
-
-(define (file-system-title fs) ;deprecated
- (match (file-system-device fs)
- ((? file-system-label?) 'label)
- ((? uuid?) 'uuid)
- ((? string?) 'device)))
-
;; Note: This module is used both on the build side and on the host side.
;; Arrange not to pull (guix store) and (guix config) because the latter
;; differs from user to user.
--
2.39.1
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sun, 05 Mar 2023 22:06:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Victal <mirai <at> makinata.eu>
:
bug acknowledged by developer.
(Sun, 05 Mar 2023 22:06:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 61842-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Bruno Victal <mirai <at> makinata.eu> skribis:
> * gnu/system/file-systems.scm (<file-system>): Change constructor name to 'file-system'.
> (report-deprecation, device-expression, process-file-system-declaration, file-system): Remove macros.
> (file-system-title): Remove procedure.
Good riddance. :-) Applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 03 Apr 2023 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.