Repository navigation
Added FSWatching base class and made related changes #14605
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ad675c1
Add FSWatching locator base class
06e6f5b
Correct glob pattern to not match python3.2whoa
c167f57
Add documentation of python binary watcher
375df6b
Fix lint errors
3ef70e3
Update ignore list
5925ab1
Add disposable registry
31f7c54
Modify FSWatching Locator
fec8c1b
Code reviews
21b740a
Use string[]
2260b17
Remove list disposable getter
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
Modify FSWatching Locator
- Loading branch information
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Actually it's
getRoot(s)as explained in the doc. Not every locator has an array of locations they want to search (getWindowsAppsRoot), some just have a single location, so this is just convenience.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.
I have added the
string[]type but not removedstring.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.
If they have a single location then they return a single element array. Returning
stringmeans that the caller always has to checktypeof result === 'string'. So it makes things simpler if we only returnPromise<string[]> | string[].(Also note that if you support return
stringthen the return type should bePromise<string[] | string> | string[] | string. However, as I said, I don't think the distinction betweenstring[]andstringadds any value while it increases complexity.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.
I don't think so.. not sure why you say that. The caller for the "string" case here just passes in
While in
string[]caseSo adding the
stringtype decreases complexity for the caller. Note this is just convenience.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.
Ah, I see the problem. I was expecting it to return one of the following (and I believe it does):
() => Promise<string[]>() => string[]() => stringWhile you appear to be thinking it is:
() => Promise<string[]>string[]stringI'm pretty sure the correct form to also meet your expectations is:
string[] | string | () => Promise<string[]> | string[]Though parentheses might be needed:
string[] | string | (() => Promise<string[]> | string[])FWIW, I agree that the
string[] | stringtypes are convenient and should be okay.