Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deprecation of attributes and attribute values #381

Open
nchaimov opened this issue Sep 30, 2020 · 5 comments
Open

Support deprecation of attributes and attribute values #381

nchaimov opened this issue Sep 30, 2020 · 5 comments

Comments

@nchaimov
Copy link
Member

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.

@khsa1
Copy link
Contributor

khsa1 commented Feb 21, 2021

Is there a list anywhere of deprecated/removed features? Or a few examples that I can use for development?

@nchaimov
Copy link
Member Author

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.

@khsa1
Copy link
Contributor

khsa1 commented Feb 28, 2021

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?

@nchaimov
Copy link
Member Author

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

@khsa1
Copy link
Contributor

khsa1 commented Apr 25, 2021

I've added this feature in b42ad2e. 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>]},
...
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants