guix-devel
[Top][All Lists]
Advanced

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

Re: 01/06: gnu: gnurl: Deprecate in favor of curl.


From: Maxim Cournoyer
Subject: Re: 01/06: gnu: gnurl: Deprecate in favor of curl.
Date: Thu, 18 Apr 2024 20:51:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Ludo,

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

> Hi,
>
> guix-commits@gnu.org skribis:
>
>> +(define-deprecated/public-alias gnurl curl)
>
> Just for the record (because it probably doesn’t matter much in this
> case), this creates a deprecated alias for the variable, but not for the
> package.
>
> For package deprecation, I think it’s best to write:
>
>   (define-public gnurl (deprecated-package "gnurl" curl))
>
> to allow “guix install gnurl” to DTRT.  Deprecating the variable itself
> is usually less important for packages.

Ugh.  I always spent some minutes looking at the docstring and they are
too general/vague to be of much practical use, at least to me, and I
often manage to get it wrong, as I did here!  I tried to follow-up with
the recommended '(define-public gnurl (deprecated-package "gnurl"
curl))' alternative, but it seems I'm not hitting a Guile module
top-level dependency cycle, as it won't byte compile, erroring with:

--8<---------------cut here---------------start------------->8---
ice-9/eval.scm:293:34: error: curl: unbound variable
--8<---------------cut here---------------end--------------->8---

Indeed, deprecated-package works by inheritance, so according to our
guidelines defined in (info '(guix) Cyclic Module Dependencies'), it
should be defined in the curl module.  I've now done so in commit
a69e5e5e47b70e3fe14040142544147fbd9239a1.

> As I write this, I realize we should probably document package
> deprecation and removal.

This would greatly help, and/or extended docstrings with practical
examples at the definition sites.

-- 
Thanks,
Maxim



reply via email to

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