[Rock-dev] autoproj: Renaming Headers after they where installed

Sylvain Joyeux bir.sylvain at gmail.com
Thu Jul 23 14:42:46 CEST 2015


On Wed, Jul 22, 2015 at 5:18 AM, Martin Zenzes <martin.zenzes at dfki.de> wrote:
> Hi folks,
>
> just wanna ask for your opinion on how to do renames of C/C++ headers
> which are to be installed into "$prefix/include/...". In the moment, the
> old installed file is kept in the install folder, while the new one is
> installed as well.
>
> This leads to consumers code silently still working, by including the
> old header and ignoring the new one.
>
> Yes, this is an API-Change and should be avoided. But as long as the new
> scheme improves readability, we can fix trivial filename changes pretty
> fast. Anyways, is there some well trodden procedure? What comes in my
> mind is:
>
> - install a file into the old header-name and add a C++ "#error", with
> proper instructions what to do.
> - removing the whole install folder once everywhere

So far, we've used two scheme
 - in the early days, autoproj would be modified to remove the deprecated file
 - more recently, a file with the old name was installed with a
#warning warning about the name change and including the new header.

For packages that are not in rock.core, #error would be a valid option
as well IMO.

Sylvain


More information about the Rock-dev mailing list