-
Notifications
You must be signed in to change notification settings - Fork 10.5k
hook for custom VFS in SourceKit #24708
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
hook for custom VFS in SourceKit #24708
Conversation
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.
Great work on a very important practical problem! This was clearly a result of a thoughtful investigation, careful design and thorough execution. I am super happy that we didn't need to resort to hacks to support this functionality.
tools/SourceKit/tools/sourcekitd/include/sourcekitd/FileSystemProvider.h
Outdated
Show resolved
Hide resolved
tools/SourceKit/tools/sourcekitd/include/sourcekitd/FileSystemProvider.h
Show resolved
Hide resolved
I'm going to do a small refactoring that will address a few of your comments about function signatures:
|
3506662
to
39bdcad
Compare
@swift-ci please test tensorflow |
1 similar comment
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
4 similar comments
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
8 similar comments
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
(working on upstreaming this in #24417; this PR is to get it into
tensorflow
so that we can start using it internally)Defines a
FileSystemProvider
interface that can be used to implement custom filesystems.Defines a
SourceKit::addFileSystemProvider
method, which is to be called aftersourcekitd_initialize()
, that registers new providers in the global context.Modifies editoropen, cursorinfo, and codecomplete requests to accept new optional
key.vfs.name
andkey.vfs.args
parameters. Ifkey.vfs.name
is defined, then SourceKit asks theFileSystemProvider
registered under that name to provide a filesystem. (TheFileSystemProvider
receives the string arraykey.vfs.args
, so that the requester can pass context to the custom filesystem.) SourceKit then uses the returned filesystem throughout the request.Includes tests for all the requests.