This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
File watchers and caching #6198
Merged
+4,260
−1,222
Merged
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
ec18bce
Cache file contents; add hash property to stats; reject writes for in…
d5893e5
Use the FileSystem from the testWindow when possible
8a80572
Only update the file hash on read or write; add blind write support.
a3fbbe5
Only cache stats and contents for watched entries
277f6f7
Add file caching unit tests
771e73c
work in progress
0ea50d4
Do not exec until connection is open and domains have been loaded; ad…
9c7d7d7
work in progress, moving synthetic events out of the impl and up to t…
24e3686
Clean up + some unit test fixes
32c37c0
Do not catch exceptions thrown by Directory.getContents callbacks
3c1e7b3
Include added and removed sets in change events
57f3085
Update search results using filesystem change event added and removed…
f565420
Add unified recursive or explicit watch and unwatch support
de3f169
Save As should always allow blind writes
94a23b8
Initial support for FSEvents-based change notifications
fdc6e5f
Fix unit tests that broke with the watcher changes
7413a2d
Add an offline callback for impl to call when all watchers should be …
f628555
Explicitly filter files using shouldShow in findAllFiles in case the …
842656b
Stub out the _fileSystemChange function for @jasonsanjose
e050826
Cache stats and directory contents (but not file contents, for space …
9a9e63b
Update the dualWrite tests to reflect the fact that synthetic change …
7b296e6
Fire a wholesale change event if watchers go offline
75ad54f
Set an inactive watched root before watching and activate it when wat…
491e3bf
Remove an unnecessary bind
0fc024e
Remove some dead code
5ee0387
Add a slightly more useful error message for CONTENTS_MODIFIED
b63df53
Disable watchers for network drives; document private AppshellFileSys…
0581be8
Apply both the entry's name and the parent path to the watchedRoot fi…
ba1d528
Only mark new entries as watched if they are beneath active watched r…
1ddf393
Always filter getAllFiles using shouldShow in case the project is not…
6200ec1
Handle a potential race in which the socket has disconnected but the …
d32b26a
unwatchPath bugfix
3d40057
Typo in Directory.create
abe72c5
Block external changes around the execution of unlink and moveToTrash
a6939e6
First attempt at extracting filesystem state updates from change noti…
63ceeb0
When updating search results as a result of filesystem changes, inclu…
6dbcea2
Improved factoring of change handling and event firing
a8941da
wire up the project tree to FileSystem change events
jasonsanjose 4dbfacc
Merge pull request #6190 from adobe/jasonsanjose/file-watchers
iwehrman d1de067
Remove a superfluous argument applied to the _handleDirectoryChange c…
iwehrman fdf0bdd
Merge branch 'brackets' into iwehrman/file-watchers
9fb030d
Only remove entries from the index after unwatch, not after _unwatchE…
28a655a
Fix the rename unit test
ec57b00
Do not swallow directory change events if there are no added or remov…
b7a1f6b
Do not insert new tree nodes when the search for the parent node retu…
f4e5517
Serialize changes to the file tree; don't expand nodes to add children
77a35d8
Remove no-longer-useful logging statements
c6967bd
Added documentation to FileSystemEntry and AppshellFileSystem.
b636495
Try again to squash the duplicate-tree-nodes bug caused by ProjectMan…
iwehrman 998317d
Add a rough FILE_SAVE dialog customized for CONTENTS_MODIFIED errors
be0645b
Allow FileSystemEntry objects to become unwatched. (Previously, unwat…
e37614d
Fix a problem with the InMemoryFile prototypical inhertance chain
f3d831b
Merge branch 'brackets' into iwehrman/file-watchers
a724116
Add additional event ordering tests
188ac33
Rename watchResults/writeCount to externalChanges/externalChangeCount…
5f16cd9
Add stub MockFileSystemImpl.recursiveWatch as a reminder to implement…
9fbbc35
Filter out image files in the FindInFiles search
4649341
Replace the _isWatched flag with an _isWatched() method
afaed1f
Avoid redundant stat calls during readFile when cached stats are avai…
iwehrman 228aa0b
Only store cached data for watched files; always return cached data w…
b844177
Always save the file hash, even when not watched.
e91be35
Show the fullPath in the contents modified error dialog
f4fd368
Fix a typo and remove a superfluous console.info statement
8634380
Make the options parameter to readFile and writeFile mandatory
c3fb961
Merge branch 'brackets' into iwehrman/file-watchers
4132060
Replace NodeConnection with NodeDomain
de6e962
Type error in _unwatchAll: unwatch takes a FileSystemEntry, not a path
2856bb0
include FileWatcherDomain in build
jasonsanjose cafec66
Address a first round of review comments
iwehrman 62e307a
Fix the watchPath/unwatchPath bind inside watchOrUnwatchEntry
iwehrman 49f99b2
Add documentation about our use of fsevents versus fs.watch for file …
iwehrman 71d27e4
Always make sure to clear cached data after unwatch; add a test to co…
8c39036
Do not remove entries from the index when watchers go offline; test t…
52cabdd
More fixes from the review: remove extra argument to watchOrUnwatch, …
896188f
Factor out a MockFileSystemModel from the MockFileSystemImpl to make …
ae7f28b
Add some basic tests for external change events
54cec57
Address more review comments
aa09120
Merge branch 'brackets' into iwehrman/file-watchers
45ffc1c
Additional external change event unit tests
b6fbdeb
Exclude all binary files from FindInFiles, not just images
f30a4eb
Error handling for missing Entry during change event
jasonsanjose e42f3db
Hack around a file tree race condition in the ProjectManager integrat…
a790803
Merge branch 'iwehrman/file-watchers' of https://github.com/adobe/bra…
a7a551d
Add an allFiles cache, used by getAllFiles, to ensure that there is a…
febbfe6
Allow Directory objects to cache their contents even while watchers a…
iwehrman 68eef10
Improved optional parameter initialization in File.write and FileSyst…
iwehrman e1a3614
Make SpecRunnerUtils.createTextFile writes blind because overwriting …
2914b98
maintain selection in refreshFileTree
jasonsanjose 4f07182
Delay the promise resolution until after we find a tree node withe se…
6262021
Merge branch 'iwehrman/file-watchers' into jasonsanjose/file-watchers
jasonsanjose 52f8ed3
Merge branch 'jasonsanjose/file-watchers' of https://github.com/adobe…
jasonsanjose 1d608b2
Always resolve refreshFileTree when _loadProject succeeds
jasonsanjose 8de072b
Merge pull request #6382 from adobe/jasonsanjose/file-watchers
iwehrman 3cc8955
Share temp project for ProjectManager-test. Code cleanup.
jasonsanjose 63896e6
Bump a few timeouts in the DCH tests to account for additional Projec…
c2caa78
Merge pull request #6384 from adobe/jasonsanjose/file-watchers
iwehrman af2b4ea
Bump a few timeouts in the ProjectManager tests to account for additi…
d0d5648
Really REALLY bump up the timeouts
7e517ee
Bump up timeouts to account for additional Project Manager synchroniz…
26309a5
Fix selection update after fs change event. Remove unnecessary update…
jasonsanjose c2680b0
fix check for added and removed files in fs change event handler
jasonsanjose db45700
Merge pull request #6398 from adobe/jasonsanjose/file-watchers
iwehrman 5a91580
Don't refresh the file tree on change events for directories outside …
3d821fe
Use Brackets shell for copying files to reduce the number of external…
6e0c286
Revert LiveDev timeout changes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Stub out the _fileSystemChange function for @jasonsanjose
- v0.36.0-10998
- test-45
- sprint-41
- sprint-40
- sprint-39
- sprint-38
- sprint-37
- sprint-36
- splitview-pre-tree2
- splitview-pre-tree
- release-39
- release-1.14.2
- release-1.14.1
- release-1.14
- release-1.14-prerelease-1
- release-1.13
- release-1.13-prerelease-3
- release-1.13-prerelease-2
- release-1.13-prerelease-1
- release-1.12
- release-1.12-prerelease
- release-1.11
- release-1.11-prerelease-2
- release-1.11-prerelease-1
- release-1.10
- release-1.10-prerelease-4
- release-1.10-prerelease-3
- release-1.10-prerelease-2
- release-1.10-prerelease-1
- release-1.9
- release-1.9-prerelease-2
- release-1.9-prerelease
- release-1.8
- release-1.8-prerelease1
- release-1.8-prerelease
- release-1.7
- release-1.7-prerelease1
- release-1.6
- release-1.6+eb4
- release-1.6-prerelease1
- release-1.5
- release-1.5+eb4
- release-1.4
- release-1.4+eb4
- release-1.4-prerelease1
- release-1.3
- release-1.3+eb4
- release-1.3-prerelease1
- release-1.2
- release-1.2+eb4
- release-1.2+eb4-Prerelease1Linux
- release-1.2-prerelease1
- release-1.2-prerelease1-Linux
- release-1.1
- release-1.1+eb4
- release-1.1-rc1
- release-1.1-prerelease1
- release-1.0
- release-1.0+eb4
- release-1.0-rc1
- release-1.0-beta1
- release-0.44
- release-0.44-beta2
- release-0.44-beta1
- release-0.43
- release-0.43-beta1
- release-0.42
- release-0.41
- linux-cef-2171
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Since the state of user documents is arguably more important than that state of the folder tree, maybe this line should go at the top of
_fileSystemChange()
just in case something goes wrong with the new tree-updating stuff? (Or alternatively, we could wrap whichever block is topmost in a try/catch)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.
Done, along with some other changes.