Allow parameters to be marked as deprecated in param.ccl files

Issue #629 new
Ian Hinder created an issue

Parameters often need to be deprecated. For backwards compatibility, the best thing to do in this situation is to accept the old parameter and print a warning that the parameter is deprecated, and what other parameter should be used instead. Writing code to handle this in each case is redundant. I propose that there should be some way of indicating in the param.ccl file that a given parameter is deprecated.

One possibility would be:

BOOLEAN out3D_ghosts "Output ghost zones" STEERABLE = ALWAYS DEPRECATED = yes DEPRECATIONMESSAGE = "This parameter will be removed in a future release. Please use XXXX instead." { } "yes"

Cactus would then detect if the user had explicitly set that parameter and, if so, it would print a warning in paramcheck along the lines of

Parameter CarpetIOHDF5::out3D_ghosts is deprecated. Please use XXXX instead.

Keyword:

Comments (1)

  1. Frank Löffler
    • removed comment

    I agree that such a mechanism should exist. However, I think having both DEPRECATED and DEPRECATIONMESSAGE isn't necessary. I propose instead simply

    BOOLEAN out3D_ghosts "Output ghost zones" STEERABLE = ALWAYS DEPRECATED = "This parameter will be removed in a future release. Please use XXXX instead." { } "yes"

  2. Log in to comment