-
Notifications
You must be signed in to change notification settings - Fork 304
Miscellaneous commits in preparation for background indexing #1214
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
Conversation
@swift-ci Please test |
9bdc440
to
4791ea7
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
4791ea7
to
f27e4b4
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
1 similar comment
@swift-ci Please test Windows |
f27e4b4
to
c18634a
Compare
@swift-ci Please test |
c18634a
to
1a64da0
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
@@ -20,6 +20,8 @@ public enum TaskDependencyAction<TaskDescription: TaskDescriptionProtocol> { | |||
case cancelAndRescheduleDependency(TaskDescription) | |||
} | |||
|
|||
private let taskSchedulerSubsystem = "org.swift.sourcekit-lsp.task-scheduler" |
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.
Couldn't we just have a separate logger?
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 just preferred to stick to the withLoggingSubsystem
, which we’ll also use for indexing (indexing will be in a different subsystem) instead of having two different notions of how to create loggers for subsystems.
And logging needs to store the subsystem in a task local variable because otherwise all log messages from SwiftPMBuildSystem
that were called from the indexer would end up in the org.swift.sourcekit-lsp
subsystem instead of org.swift.sourcekit-lsp.indexing
.
No particular motivation for this change.
This way we’ll be able to use it from the semantic indexer.
This will allow us to conditionally enable background indexing in tests
This allows us to enable background indexing for a workspace based on a value in `SourceKitLSPServer.Options`.
…erver` to `BuildSystemManager` This allows us to determine the toolchain to use during background indexing. It also moves toolchain selection closer to the build system, which is good because when we support multiple toolchains for a single workspace, the build system is what decides which toolchain to use for which document.
The build system has potentially more information about a document's language than we do based on the file’s extension.
… the process if the `Task` is cancelled
This allows us to get rid of the lock.
1a64da0
to
28d0dd3
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
A collection of unrelated commits that background indexing and preparation will build upon (and a few unrelated cleanup commits).
Best reviewed commit by commit.