Skip to content
Back to formatted view

Raw Message

Message-ID: <c6396ae6-ea95-94e7-b592-57b08aec53bb@gmail.com>
Date: 2021-10-11T11:56:39Z
From: Duncan Murdoch
Subject: [R-pkg-devel] which functions to deprecate
In-Reply-To: <CAJuCY5zYavOjbrgxxu_-Nsr8o1gAUrZk=yKBwunZ-sWThCpN0w@mail.gmail.com>

On 11/10/2021 7:06 a.m., Thierry Onkelinx wrote:
> Dear all,
> 
> I have a package with a legacy main function which calls a few exported
> functions. In practice most users will only call the main function. Should
> I deprecate only the main function or all the legacy functions? The latter
> case generates more deprecation warnings when calling the main function.

I'd say you should deprecate all the functions you intend to stop 
exporting two releases from now, i.e. they'll all be deprecated in
the next release, and defunct in the release after that.

If you find that calling the main function generates too many messages, 
then you could leave the others undeprecated for now, and deprecate them 
when you finally mark the main one as defunct (or delete it).  That is:

next release:  main is deprecated
next+1 release: main is defunct, others are deprecated
next+2 release: all are defunct

Alternatively, you could deprecate all of them now, but edit the main 
one so it suppresses the deprecation messages in the others. 
Deprecation messages are documented to have class "deprecatedWarning", 
so you can suppress only those messages if you work at it.

Duncan Murdoch