-
Notifications
You must be signed in to change notification settings - Fork 759
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
remove_s4_classes() respecting inheritance #849
remove_s4_classes() respecting inheritance #849
Conversation
prevents derived classes to remain orphan Fixes r-lib#848
Mmm... contrary to #848, with this reverse removing of classes the error arises when the derived class is named 'splines'. What is it special with this name? |
Fixes r-lib#848 (now it does)
Ok. There is nothing particular with the class name I needed to write a small routine to sort the classes defined in the package, so that extended classes are before their respective extensions. With this approach I think the problem is solved. |
@wch happen to remember an elegant way to do this? |
Ideally you'd do a topological sort on the S4 dependency graph before deleting |
Right. My solution worked for me, but not necessarily in general. |
Could you please add some unit tests for |
sure... in a couple of weeks. |
solved previous unanswered question in a related test (s4-unload)
Done, with some modifications thanks to the testing. |
} | ||
|
||
## Matrix of classes in columns, extending classes in rows | ||
extended_classes <- vapply(classes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent arguments by only two spaces
Could you please also add a bullet to NEWS? |
@@ -0,0 +1,11 @@ | |||
Package: testS4sort | |||
Title: Test package for sorting S4 classes | |||
License: GPL-3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be best to just take out the License
field here. Or it should be the same license as devtools itself.
Done. |
remove_s4_classes() respecting inheritance. Closes #848
Thanks! |
prevents derived classes to remain orphan
Fixes #848