Commit Graph

32612 Commits

Author SHA1 Message Date
Ash Wilson
1285a89a4b Reset @watchersByPath on atom.project.setPaths 2017-08-01 15:55:28 -04:00
Ash Wilson
ee9ad53d91 🔥 unused variables 2017-08-01 15:55:08 -04:00
Ash Wilson
b3f327b0b3 Implement atom.project.onDidChangeFiles 2017-08-01 15:08:07 -04:00
Ash Wilson
697dfaf3b3 Re-export watchPath 2017-08-01 15:08:07 -04:00
Ash Wilson
67a8ba2a04 Adjust specs for the changed event shape 2017-08-01 15:08:07 -04:00
Ash Wilson
ba11070d16 Translate nsfw events to the events we're advertising 2017-08-01 15:08:07 -04:00
Ash Wilson
afdb2f13a6 Doooooocs 2017-08-01 15:08:07 -04:00
Ash Wilson
53ea430019 Update spec name 2017-08-01 15:08:07 -04:00
Ash Wilson
3fab3fed36 Consistent path handling in specs 2017-08-01 15:08:07 -04:00
Ash Wilson
6fdeedd4ab Introduce a helper to re-join split absolute paths regardless of platform 2017-08-01 15:08:07 -04:00
Ash Wilson
3c967b07ef Use a cross-platform way to generate absolute paths for specs 2017-08-01 15:08:07 -04:00
Ash Wilson
9c874c921e Use the watchPath API in specs 2017-08-01 15:08:07 -04:00
Ash Wilson
4f0b52d2ab Move the global watcher registry to a lazily initialized manager 2017-08-01 15:08:07 -04:00
Ash Wilson
99d6f911cf Rename the filesystem-manager-spec too 2017-08-01 15:08:06 -04:00
Ash Wilson
7aab9925a8 Rename filesystem-manager to path-watcher 2017-08-01 15:08:06 -04:00
Ash Wilson
7aeca7fc8c 🔥 FileSystemManager 2017-08-01 15:08:06 -04:00
Ash Wilson
2d8f812f56 More documentation touchups. 2017-08-01 15:08:06 -04:00
Ash Wilson
2ae70aac08 Document RegistryTree. 2017-08-01 15:08:06 -04:00
Ash Wilson
ba7275dc4f Dump the tree structure to a string for debugging 2017-08-01 15:08:06 -04:00
Ash Wilson
d4edc6b894 Extra character for some reason? 2017-08-01 15:08:06 -04:00
Ash Wilson
0b17b35244 👕 :burn: whitespace 2017-08-01 15:08:06 -04:00
Ash Wilson
6cc3e4b6d2 Test case for consolidating child watchers during split 2017-08-01 15:08:06 -04:00
Ash Wilson
2b79295d0b (Untested) work to adapt to the registry API changes 2017-08-01 15:08:06 -04:00
Ash Wilson
0c5674a56c Split subtrees into child watchers on parent watcher removal 2017-08-01 15:08:06 -04:00
Ash Wilson
a5f217fd51 WIP work on rewatching child directories 2017-08-01 15:08:05 -04:00
Ash Wilson
60e6da9097 Weird-ass concurrent mkdir() error 2017-08-01 15:08:05 -04:00
Ash Wilson
c2810b626c Propagate errors to subscribers with an onDidError callback 2017-08-01 15:08:05 -04:00
Ash Wilson
f75aa1ae03 Use onWillStop() instead of onDidStop()
This will prevent new Watchers from attaching to NativeWatchers that are
in the process of stopping.
2017-08-01 15:08:05 -04:00
Ash Wilson
b34a9d6972 Only resolve the waitForChanges promise once 2017-08-01 15:08:05 -04:00
Ash Wilson
6d17fc880d Opportunistic native watcher stopping 2017-08-01 15:08:05 -04:00
Ash Wilson
7ec79a00fc Set running = false before the asynchronous stop operation 2017-08-01 15:08:05 -04:00
Ash Wilson
80a9126fdb Start NativeWatchers lazily and stop them opportunistically 2017-08-01 15:08:05 -04:00
Ash Wilson
9c8ed35b26 Provide native watcher creation function to the NativeWatcherRegistry constructor 2017-08-01 15:08:05 -04:00
Ash Wilson
6e6c0a5ef9 Use getStartPromise() in specs 2017-08-01 15:08:05 -04:00
Ash Wilson
53dcc00bfc Don't cleanup temp between runs to prevent reused directory names 2017-08-01 15:08:05 -04:00
Ash Wilson
246e87b660 👕 keep standard happy 2017-08-01 15:08:04 -04:00
Ash Wilson
d858e37058 Support pending specs with an empty body 2017-08-01 15:08:04 -04:00
Ash Wilson
c8882ca92b Start and stop NativeWatchers automatically using onDidChange subs 2017-08-01 15:08:04 -04:00
Ash Wilson
4194e7f3b5 Remove stopped watcher nodes with the power of RECURSION 2017-08-01 15:08:04 -04:00
Ash Wilson
f3a4c74158 🔥 console.log 2017-08-01 15:08:04 -04:00
Ash Wilson
0325a77d59 Test NativeWatcher removal 2017-08-01 15:08:04 -04:00
Ash Wilson
882095eea6 Test child watcher adoption 2017-08-01 15:08:04 -04:00
Ash Wilson
be681d1324 Use a private utility function to wait for all native watchers to stop 2017-08-01 15:08:04 -04:00
Ash Wilson
12c961c8b9 Maintain a Set of living NativeWatcher instances 2017-08-01 15:08:04 -04:00
Ash Wilson
9f518736e1 Track the current NativeWatcher assigned to a Watcher 2017-08-01 15:08:04 -04:00
Ash Wilson
8d86acf19c Don't report errors after stop 2017-08-01 15:08:03 -04:00
Ash Wilson
baf71492a2 .dispose() all subscribers on a NativeWatcher 2017-08-01 15:08:03 -04:00
Ash Wilson
21e381033c Start native watchers when attached 2017-08-01 15:08:03 -04:00
Ash Wilson
39085ce3dc First few FileSystemManager specs 2017-08-01 15:08:03 -04:00
Ash Wilson
e4c48a5c8c 👕 for FileSystemManager 2017-08-01 15:08:03 -04:00