Modify

Opened 7 years ago

Last modified 7 years ago

#629 new enhancement

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

Reported by: Ian Hinder Owned by:
Priority: minor Milestone:
Component: Cactus Version:
Keywords: Cc:

Description

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.

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Frank Löffler

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"

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
Next status will be 'confirmed'.
The owner will be changed from (none) to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.