Open nchaimov opened 4 years ago
Is there a list anywhere of deprecated/removed features? Or a few examples that I can use for development?
What motivated this is OMPT tr4 and tr6, which are deprecated in TAU — they’re still available, but we want to warn users that they might be removed in a future release.
To make sure I have the idea, download-tr4
should be removed from the metavar for ompt_source
, but if a user gives that option anyway it should still work (for now) and just give a warning. At some point, when download-tr4
is removed, there should be a function that checks what version of TAU is being used. If the version is before it was removed, keep the deprecation warning and if it's been removed give the appropriate error message?
Do you think it would be sufficient to create a list of deprecated/removed features or should I try to add this in the model attributes?
Yes, I think that’s basically what we want. We can’t actually remove the deprecated or removed values from the models or new versions of TAU Commander won’t work with existing databases that use those values, so we want to hide them from the help text but still support them for now, with a warning, and when they’re eventually removed, give an error if the user tries to create a new object using the removed value or if they try to run a trial using one.
I think it would be best to incorporate this into the model attributes, perhaps as a constraint based on the TAU version
I've added this feature in b42ad2e96e470a63272102ca224240b786b4218f. Please take a look and let me know if there are any changes I should make. We just need to add a deprecated
option to the option that has been deprecated. Either a string or a list can be passed in, i.e.:
ompt_source: {
...
'deprecated': {'download-tr4': '2.29.1'},
'deprecated': {'download-tr4': ['2.29.1']},
'deprecated': {'download-tr4': ['2.29.1', '']},
'deprecated': {'download-tr4': ['2.29.1', <removed tau version>]},
...
}
Some TAU features are deprecated or removed from TAU in certain versions of TAU. TAU Commander should be made aware of deprecated or removed features and specify a warning or error if these are used depending on the version of TAU. Deprecated or removed features should not be listed in the help, but support for deprecated features should be retained so that compatibility with databases containing TAM objects referring to them is maintained.