all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: 01/06: gnu: gnurl: Deprecate in favor of curl.
       [not found] ` <20240406155405.34F4DC12C2D@vcs2.savannah.gnu.org>
@ 2024-04-08  9:11   ` Ludovic Courtès
  2024-04-19  0:51     ` Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2024-04-08  9:11 UTC (permalink / raw)
  To: guix-devel, Maxim Cournoyer

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.

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

Ludo’.


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

* Re: 01/06: gnu: gnurl: Deprecate in favor of curl.
  2024-04-08  9:11   ` 01/06: gnu: gnurl: Deprecate in favor of curl Ludovic Courtès
@ 2024-04-19  0:51     ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2024-04-19  0:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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


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

end of thread, other threads:[~2024-04-19  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <171241884468.15036.13062380984395745916@vcs2.savannah.gnu.org>
     [not found] ` <20240406155405.34F4DC12C2D@vcs2.savannah.gnu.org>
2024-04-08  9:11   ` 01/06: gnu: gnurl: Deprecate in favor of curl Ludovic Courtès
2024-04-19  0:51     ` 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.