-
Notifications
You must be signed in to change notification settings - Fork 350
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
Allow nesting of trees #1059
Allow nesting of trees #1059
Conversation
I've been considering doing this exact thing for a while, because it kind of allows for a sort of 'mounting' type of system. However, the methods having multiple purposes ( So one thing I'm wondering is, could it make sense to instead just add a new interface that only defines the |
I'm also not a fan of the method name conflicts. A separate interface for just the |
Well, adding a separate interface for this one function might simply be a step in the right direction. I don't think we'd paint ourselves into a corner if we do have real use-cases for having the other methods. |
True. I would go for I'll look into implementing this tomorrow |
Codecov Report
@@ Coverage Diff @@
## master #1059 +/- ##
============================================
- Coverage 97.92% 97.76% -0.16%
- Complexity 2867 2880 +13
============================================
Files 174 174
Lines 7898 7919 +21
============================================
+ Hits 7734 7742 +8
- Misses 164 177 +13
Continue to review full report at Codecov.
|
@icewind1991 let's revive this once work continues on #1060 |
@icewind1991 rebase and move on? 😉 |
feel free to reopen if this is still of interest |
Makes
Tree
implementICollection
and modifygetNodeForPath
to pass the request to nested trees.My main use case for this in Nextcloud is that for part of the tree we can optimize
getNodeForPath
by directly getting the target node instead of going trough all parent nodes, but there is currently no clean way to apply this optimization to only a part of the dav tree.With nested trees we could put this optimization in a separate
Tree
subclass and nest it into the "main" tree.