all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Potential minor API change notice
@ 2022-11-28 20:07 Maxim Cournoyer
  2022-11-29  9:02 ` Ludovic Courtès
  2022-12-05 16:19 ` Katherine Cox-Buday
  0 siblings, 2 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2022-11-28 20:07 UTC (permalink / raw)
  To: info-guix@gnu.org mailing list; +Cc: guix-devel

Hello,

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.

For the rationale and more details, see the proposed change [0].

[0]  https://issues.guix.gnu.org/59661#1

Thanks,
Maxim


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Potential minor API change notice
  2022-11-28 20:07 Potential minor API change notice Maxim Cournoyer
@ 2022-11-29  9:02 ` Ludovic Courtès
  2022-11-29 16:40   ` Maxim Cournoyer
  2022-12-05 16:19 ` Katherine Cox-Buday
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-11-29  9:02 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel

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.

Ludo’.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Potential minor API change notice
  2022-11-29  9:02 ` Ludovic Courtès
@ 2022-11-29 16:40   ` Maxim Cournoyer
  2022-12-02  9:06     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Maxim Cournoyer @ 2022-11-29 16:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

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?  It gets removed in the patch (well, moved
to another module and renamed, but we can't import it from that module).

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Potential minor API change notice
  2022-11-29 16:40   ` Maxim Cournoyer
@ 2022-12-02  9:06     ` Ludovic Courtès
  2022-12-04  4:44       ` Maxim Cournoyer
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-12-02  9:06 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel

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.

What’s important is to never ever remove a public variable, or change
the signature of a public procedure, without prior deprecation period
(at least for interfaces that one may use in their System or Home config
files.)

gnu/{services,packages}/*.scm contain bindings that have been deprecated
for years.  That’s probably excessive, but lack of a deprecation period
would unnecessarily upset fellow users and then we’d have to channel
their anger.  :-)

Ludo’.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Potential minor API change notice
  2022-12-02  9:06     ` Ludovic Courtès
@ 2022-12-04  4:44       ` Maxim Cournoyer
  0 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2022-12-04  4:44 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Potential minor API change notice
  2022-11-28 20:07 Potential minor API change notice Maxim Cournoyer
  2022-11-29  9:02 ` Ludovic Courtès
@ 2022-12-05 16:19 ` Katherine Cox-Buday
  2022-12-05 19:29   ` Maxim Cournoyer
  1 sibling, 1 reply; 7+ messages in thread
From: Katherine Cox-Buday @ 2022-12-05 16:19 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: info-guix@gnu.org mailing list, guix-devel

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> 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.
>
> For the rationale and more details, see the proposed change [0].
>
> [0]  https://issues.guix.gnu.org/59661#1

Maxim, I just wanted to say thank you for taking the feedback from the
last breaking change, and not only graciously listening, but
implementing it so quickly. You are a true leader!

Sincerely,
-- 
Katherine


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Potential minor API change notice
  2022-12-05 16:19 ` Katherine Cox-Buday
@ 2022-12-05 19:29   ` Maxim Cournoyer
  0 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2022-12-05 19:29 UTC (permalink / raw)
  To: Katherine Cox-Buday; +Cc: guix-devel

Hi Katherine,

Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> 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.
>>
>> For the rationale and more details, see the proposed change [0].
>>
>> [0]  https://issues.guix.gnu.org/59661#1
>
> Maxim, I just wanted to say thank you for taking the feedback from the
> last breaking change, and not only graciously listening, but
> implementing it so quickly. You are a true leader!

Thank you!  Note that in this case, thanks to feedback from the
reviewers, the API was not "broken" in the end; a deprecated variable is
acting in place of the removed one (and emits a warning upon use).  It's
not functionally equivalent though, so it was good anyway to have it
communicated.

Have a good week,

-- 
Maxim


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-05 19:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 20:07 Potential minor API change notice Maxim Cournoyer
2022-11-29  9:02 ` Ludovic Courtès
2022-11-29 16:40   ` Maxim Cournoyer
2022-12-02  9:06     ` Ludovic Courtès
2022-12-04  4:44       ` Maxim Cournoyer
2022-12-05 16:19 ` Katherine Cox-Buday
2022-12-05 19:29   ` Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.