-
Notifications
You must be signed in to change notification settings - Fork 304
Don't wait for build graph generation when file is changed #2051
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
Conversation
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
ahoppen
added a commit
to ahoppen/sourcekit-lsp
that referenced
this pull request
Mar 11, 2025
… currently happening - **Issue**: Since swiftlang#1973, we are watching for all changes in SourceKit-LSP. This means that we get notified every time the index database is changed. Each of these modifications triggers a new task that waits for build system updates to determine if the modified file needs to be re-indexed. While this task finishes very quickly, it still causes `Scheduling indexing` to replace the `Indexing x / y` in the index status during initial indexing, which looks very noisy. - **Explanation**: To avoid this flickering, only show `Scheduling indexing` in the index status if we aren’t already indexing any files - **Scope**: Index progress status - **Original PR**: This is a significantly reduced version of swiftlang#2051 - **Risk**: Low, this only changes the precedence of status messages in the indexing status - **Testing**: Manually verified that we don’t see `Scheduling indexing` appear during initial indexing of a package - **Reviewer**: @bnbarham
@swift-ci Please test |
hamishknight
approved these changes
Mar 11, 2025
b36580f
to
bade2b7
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
4 similar comments
@swift-ci Please test Windows |
@swift-ci Please test Windows |
@swift-ci Please test Windows |
@swift-ci Please test Windows |
Since we re-index source files if the build server sends us a `buildTarget/didChange` notification, we no longer need to wait for an up-to-date build graph when a file is modified. This resolves an issue that causes a `Scheduling tasks` progress to appear in the status bar whenever a file in the project is changed. Before swiftlang#1973, this happened fairly frequently during the initial indexing when a header file was written into the build directory. After that PR the `Scheduling Indexing` status appears a lot more frequently, namely every time the index’s database is modified, which happens quite all the time during indexing...
bade2b7
to
dcad3f4
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
1 similar comment
@swift-ci Please test Windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since we re-index source files if the build server sends us a
buildTarget/didChange
notification, we no longer need to wait for an up-to-date build graph when a file is modified. This resolves an issue that causes aScheduling tasks
progress to appear in the status bar whenever a file in the project is changed. Before #1973, this happened fairly frequently during the initial indexing when a header file was written into the build directory. After that PR theScheduling Indexing
status appears a lot more frequently, namely every time the index’s database is modified, which happens quite all the time during indexing...