Fix symlinked directories not being watched#46338
Fix symlinked directories not being watched#46338auwi-nordic wants to merge 9 commits intozed-industries:mainfrom
Conversation
|
Hey, thanks for the contribution, and sorry for the delay in reviewing. I'm a bit concerned about the performance implications of this fix, iterating all workspace entries and taking the first one that matches does not seem to be to be a robust or performant solution. |
651d26c to
e00a0a7
Compare
|
@probably-neb I've updated the pull requests with some improvements now
While testing this fix again, I realized it's not updating symlinks within the project. I don't remember why I only implemented fix for symlinks pointing outside the project. And the issue this PR claims to close doesn't say anything about whether the symlinks point inside or outside. So I added fix for the inside case as well. |
|
BTW, I also did some manual checking that the fix interacts nicely with #51382 , so when a symlinked directory is expanded in project tree, file changes are also visible in the index. E.g. a newly added file in a symlinked directory is searched by "Find in Folder" |
|
Did some more reviewing and added some more cleanup, plus another test "test_symlinked_dir_removal_cleans_up_routing" Now I'm wondering if the three tests added by this PR should be combined into one. I could do that if it's preferable. Otherwise I think I'm done with this round of improvements. I actually ran one more review, and some potential issues came up, but I think at this point the issues are nitpicks
|
|
Hey @auwi-nordic, thank you for being so responsive to the review comments, and taking the time to try and solve this. I just realized that #50746 (which I am also assigned to review) is solving the same problem. The solution in the other PR is very similar, but it canonicalizes events at the background layer instead of the worktree snapshot layer. I think this is a better layer to solve the problem at, so I'm going to close this PR and merge that one. Apologies for not realizing the conflict sooner |
|
No worries @probably-neb , just happy it's getting resolved |
Closes #35173 and #27263
Code was written by AI agent. Test was reviewed and accepted as is. Fix was reviewed thoroughly and some fixes was done to improve code quality.
Release Notes: