Skip to content

Don’t show a “Preparing current file” progress while determining target of file #1379

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

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 31, 2024

Every time a request regarding a text document is sent, we call schedulePreparationForEditorFunctionality on the SemanticIndexManager with the assumption that it’s a no-op if the target is already prepared. We did, however, show the “Preparing current file” status while we were determining the file‘s target to determine that the file’s target is up-to-date.

…et of file

Every time a request regarding a text document is sent, we call `schedulePreparationForEditorFunctionality` on the `SemanticIndexManager` with the assumption that it’s a no-op if the target is already prepared. We did, however, show the “Preparing current file” status while we were determining the file‘s target to determine that the file’s target is up-to-date.
@ahoppen ahoppen requested review from bnbarham and hamishknight May 31, 2024 14:07
@ahoppen ahoppen requested a review from benlangmuir as a code owner May 31, 2024 14:07
@ahoppen
Copy link
Member Author

ahoppen commented May 31, 2024

@swift-ci Please test

Comment on lines +881 to +882
// Opening the document prepares it for editor functionality. Its target is already prepared, so we shouldn't show
// a work done progress for it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What make sit already prepared?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating a SwiftPMTestProject polls the index (pollIndex parameter in the initializer defaults to true), so just creating the project will ensure that the index is up-to-date.

@ahoppen ahoppen merged commit e011829 into swiftlang:main May 31, 2024
3 checks passed
@ahoppen ahoppen deleted the no-prepare-for-editor-task-while-determining-target branch May 31, 2024 20:15
Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (given you added the defer in another PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants