guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Potential minor API change notice


From: Maxim Cournoyer
Subject: Re: Potential minor API change notice
Date: Sat, 03 Dec 2022 23:44:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Hi,
>>>
>>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>>
>>>> This is a heads up to let you know that the
>>>> %BASE-PACKAGES-DISK-UTILITIES public variable exported from (gnu system)
>>>> may be removed in the near future.
>>>
>>> If the patch eventually gets consensus, I would suggest making that
>>> variable an alias using ‘define-deprecated’: that way people will know
>>> about it and code won’t break.
>>
>> An deprecated alias to what?
>
> To ‘%base-packages’ for example?  It doesn’t really matter.

I've found that by setting the replacement to #f, it does what I want:

--8<---------------cut here---------------start------------->8---
1 file changed, 4 insertions(+)
gnu/system.scm | 4 ++++

modified   gnu/system.scm
@@ -38,6 +38,7 @@ (define-module (gnu system)
   #:use-module (guix gexp)
   #:use-module (guix records)
   #:use-module (guix packages)
+  #:use-module (guix deprecation)
   #:use-module (guix derivations)
   #:use-module (guix profiles)
   #:use-module ((guix utils) #:select (substitute-keyword-arguments))
@@ -177,6 +178,7 @@ (define-module (gnu system)
             %base-packages-interactive
             %base-packages-linux
             %base-packages-networking
+            %base-packages-disk-utilities
             %base-packages-utils
             %base-firmware
             %default-kernel-arguments))
@@ -894,6 +896,8 @@ (define %base-packages-networking
         ;; many people are familiar with, so keep it around.
         iw wireless-tools))
 
+(define-deprecated %base-packages-disk-utilities #f '())
+
 (define %base-packages
   ;; Default set of packages globally visible.  It should include anything
   ;; required for basic administrator tasks.
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix system build ~/stow/guix/hurd.scm
/home/maxim/stow/guix/hurd.scm:410:22: warning: '%base-packages-disk-utilities' 
is deprecated
--8<---------------cut here---------------end--------------->8---

I've sent a v2 to 59661 (you are in cc).

-- 
Thanks,
Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]