Commit Graph
25009 Commits
Author SHA1 Message Date
Max BrunsfeldandNathan Sobo ac40391c67 Avoid redundant clearing of descendants when scanning dirs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-22 10:30:47 -07:00
f7498ed35d Log when there's an error while scanning a directory
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-22 19:15:37 +02:00
2ded57b499 Simulate .gitignores in the randomized test
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-22 18:57:46 +02:00
622abe8a52 Clear descendants of existing children when scanning a directory
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-22 18:42:11 +02:00
Antonio Scandurra 5340592ee1 Replace linear scan of entries with a custom FileIter 2021-04-22 17:29:36 +02:00
Antonio Scandurra b11ab0b394 Remove is_ignored from PathEntry and lean more on the tree instead 2021-04-22 16:49:11 +02:00
Antonio Scandurra 212ec2bc07 Ignore .git folder 2021-04-22 16:48:13 +02:00
Antonio Scandurra 1055788878 Let ignore edits batch naturally without imposing a max batch len 2021-04-22 16:47:41 +02:00
Antonio Scandurra 72fb1da21e Recompute ignore status when .gitignore changes or for new entries 2021-04-22 15:14:23 +02:00
Max Brunsfeld 34e872f98c Start work on handling changes to gitignore files
* Use the published ignore crate
* Store ignore objects on snapshot, and use them to compute
  files' ignored status dynamically, instead of storing the
  ignored status on the file.
2021-04-21 18:11:52 -07:00
Max Brunsfeld 7944856d60 wip - gitignore handling on rescan 2021-04-21 12:30:30 -07:00
Max BrunsfeldandNathan Sobo 36b8931801 Store paths as strings on PathMatch structs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-21 12:05:34 -07:00
Max BrunsfeldandNathan Sobo 5834bc1585 Check worktree invariants in randomized test
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-21 11:46:49 -07:00
Max BrunsfeldandNathan Sobo f206b2398c Fix missing insert in populate_dir
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-21 11:39:50 -07:00
Nathan SoboandMax Brunsfeld 2d12a8a94b WIP
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-21 12:29:16 -06:00
Nathan SoboandMax Brunsfeld 3da2a00b48 WIP: Establish new invariant-maintaining API for mutating worktree snapshots
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-21 12:08:09 -06:00
Antonio ScandurraandNathan Sobo 208c58312b WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-21 16:58:17 +02:00
Antonio Scandurra 305a3097f4 Re-enable file finder test and bind menu:select-{next-prev} 2021-04-21 10:07:32 +02:00
Max Brunsfeld f2dfc63d15 Merge pull request #23 from zed-industries/fix-mac-mini-failures
Use our own scoped_pool implementation
2021-04-20 16:01:47 -07:00
Max BrunsfeldandNathan Sobo b721209f29 Fully halt background scanner threads when dropping Worktree
* Rework fsevent API to expose a handle for halting the event stream

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-20 15:55:29 -07:00
Max Brunsfeld 4367b00060 Use our own scoped_pool implementation 2021-04-20 14:07:36 -07:00
Max BrunsfeldandAntonio Scandurra d7f0431880 Stop processing events if root path is deleted
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:40:17 -07:00
Max BrunsfeldandAntonio Scandurra 00c075ee4f Worktree: silence log message when dir is overwritten by file
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:12:48 -07:00
81cd133362 WIP
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:59:12 -06:00
dcd7e7d347 Remove task_done condvar which supported finish_pending_tasks
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:45:42 -06:00
4d16b59636 Ensure we remove broadcast channels after all conditions resolve
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:43:13 -06:00
e249900bb5 Panic when awaiting conditions on dropped entities
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:36:54 -06:00
Antonio ScandurraandNathan Sobo 5dd6557f09 Use env_logger instead of simplelog in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-20 17:34:14 +02:00
Antonio ScandurraandNathan Sobo 91e58f9803 Time out condition after 200ms and add basic unit tests for it
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-20 17:21:29 +02:00
Antonio Scandurra eb174da091 Replace remaining usages of finish_pending_tasks with condition 2021-04-20 12:28:30 +02:00
Antonio Scandurra 447b3be78b Use scan_complete and the new ModelHandle::condition test method 2021-04-20 11:48:12 +02:00
Antonio Scandurra b26c9fe4e0 Rework Worktree::scan_complete to use a watch 2021-04-20 11:24:46 +02:00
Nathan Sobo 8035044bb0 WIP: Add a condition method to model and view handles for use in tests
It returns a future that resolves when the provided predicate returns true. The predicate is called any time the handle's targeted entity calls notify.

Still need to add a timeout and completely remove finsih_pending_tasks.
2021-04-19 22:01:54 -06:00
Max Brunsfeld 52ae5fd96e Add a method for waiting until a worktree's current scan is complete
Start removing usages of finish_pending_tasks in tests
2021-04-19 17:45:01 -07:00
Max Brunsfeld 836821a494 Enable split debuginfo for faster compiles 2021-04-19 15:00:10 -07:00
Max Brunsfeld 1135ba1db8 Get all worktree tests passing
* Store non-canocalized path on worktree, but canonicalize it for the purpose of processing events
* Simplify rescan unit test
2021-04-19 14:11:55 -07:00
Max Brunsfeld 02ed5983ee 💄 process_events 2021-04-19 13:19:34 -07:00
Max Brunsfeld 9eb4d01229 Worktree: handle files being renamed to overwrite dirs 2021-04-19 13:07:32 -07:00
Max Brunsfeld a94e71c6fa Add an example executable for fsevents 2021-04-19 13:05:34 -07:00
Max Brunsfeld 5c5bbb20e4 💄 Reduce nesting in Snapshot::remove_path 2021-04-19 12:15:24 -07:00
Max BrunsfeldandAntonio Scandurra a3ac38b562 Get worktree randomized test passing
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-19 11:59:22 -07:00
Antonio ScandurraandMax Brunsfeld 5333eb892b WIP: Associate entry names with directory children
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-04-19 20:16:54 +02:00
Antonio Scandurra 289e499edd WIP 2021-04-19 19:41:37 +02:00
Antonio Scandurra f75052df62 Enable logging automatically when passing a SEED env variable 2021-04-19 13:01:13 +02:00
Antonio Scandurra a0f1cdd8a2 Don't change parent entries for moves within the same directory 2021-04-19 13:00:13 +02:00
Antonio Scandurra 42dd60a150 Recompute the PathEntry for each file under a re-parented subtree 2021-04-19 12:53:02 +02:00
Antonio Scandurra 4e20c734e8 Start on a randomized test for Worktree 2021-04-19 12:01:33 +02:00
Max Brunsfeld 5f8c212a06 Update entries' filenames when handling move events 2021-04-17 15:22:52 -07:00
Max Brunsfeld b813594b8f Start filling out new structure for processing fs events 2021-04-16 15:22:46 -07:00
Nathan SoboandMax Brunsfeld 026f539426 WIP: Lay down a skeleton for another attempt at rescan
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-16 12:53:07 -06:00