-
Notifications
You must be signed in to change notification settings - Fork 0
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
Deprecation: General Strategy. We should call the replacement function, right? #17
Comments
While answering, I think of functions that are renamed in or removed from [In short] The main idea of mine is (if there are no real issues related to the size of the package) to leave the functionality of the old functions as it is now in order not to break other people's code. And not to make the functionality of the old functions depend on the functionality of the replacement function as, in general, the functionality may differ. There are some points to consider:
Did I answered your question, @bryanhanson? or did you have something more specific in mind? I'm not sure I understand this correctly:
@bryanhanson, do you mean not changing the |
The reason that I started this issue was a discussion with @cbeleites about avoiding the situation where we have two sets of the same/almost the same code to maintain. Now I am convinced it is a little more nuanced. I'm still thinking this through (be sure to look at #18) but perhaps the best approach is to leave the old code where it is, with the deprecation messages, then release the new If we do things this way I still think we should flatten the |
In some cases replacement functions are used in the body of deprecated functions in #331 |
Before going into details for hyperSpec,
I think we have 2 or 3 "patterns" of functions we have deprecated:
To me, deprecated means also:
For the big subset of deprecated functions in hyperSpec that have been renamed within hyperSpec, the new .R file with the definition of |
Do I get correctly, that these are the main points we should do/recheck about the deprecated functions:
OK, then for the renamed functions that are left in
For import functions, that are moved to other packages:
For other functions, that are moved to other packages (
For renamed functions that are in
We'll include this warning in deprecation messages. |
I'm making an issue here because it affects all of
r-hyperspec/...
.To date, I've avoided thinking much about the deprecation process in
cbeleites/hyperSpec
, hoping I wouldn't have to!But, lately in the course of giving @sangttruong guidance, I've had a brief look at the deprecation process we currently have. It seems that right now, when a function is deprecated there's a lot of things in the file that get changed (like documentation), and the user gets a nice message about the deprecation with some guidance (all nicely automated thanks to @GegznaV ). However, it looks like the code that runs is the existing code. Shouldn't the program flow be transferred to the replacement function by calling the replacement function? In this case the existing function and unit tests would all be stripped out making a rather small file. And of course, this change would apply only to the
develop
branch; themaster
branch must continue to work as it has.It's possible that calling the replacement function could be made automatic as well by some combination of
match.call
anddo.call
-- the function that generates the messages could also call the new code. That would reduce the amount of editing to be done.Perhaps I am missing something here, I did not study this in great detail. But, I wanted to raise the issue just in case.
The text was updated successfully, but these errors were encountered: