unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: 01/06: gnu: gnurl: Deprecate in favor of curl.
Date: Thu, 18 Apr 2024 20:51:16 -0400	[thread overview]
Message-ID: <8734rinpiz.fsf@gmail.com> (raw)
In-Reply-To: <87il0srzg8.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 08 Apr 2024 11:11:35 +0200")

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	other threads:[~2024-04-19  0:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734rinpiz.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).