Hi Ludo, Ludovic Courtès <[email protected]> writes:
> Hi, > > [email protected] 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
