Skip to content

[5.7] Close temporarily opened documents #568

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 1 commit into from
Jun 22, 2022

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jun 9, 2022

  • Explanation: To satisfy certain kinds of semantic requests, we open a source document with a temporary prefix but forgot to close them afterwards. This caused issues on Windows where these files are opened exclusively This fixes an issue for SourceKit-LSP on Windows where these files are opened exclusively and couldn’t be modified anymore.
  • Scope: May affect pretty much all of SourceKit-LSP
  • Risk: Low, not closing the documents was just an oversight
  • Testing: @compnerd verified that the Windows issue no longer occurs with this fix
  • Issue: Some sourcekitd documents opened in SwiftLanguageServer are never closed #553 (rdar://93154201)
  • Reviewer: @benlangmuir on Close temporarily opened documents #566

We only open a document e.g. with the `FoldingRanges:` prefix to get the document structure as a one-off task, so we should be closing it afterwards.

Fixes swiftlang#553 (rdar://93154201)
@ahoppen ahoppen requested a review from benlangmuir as a code owner June 9, 2022 08:15
@ahoppen ahoppen requested a review from airspeedswift June 9, 2022 08:16
@ahoppen
Copy link
Member Author

ahoppen commented Jun 9, 2022

@swift-ci Please test

@ahoppen ahoppen merged commit 64de5e9 into swiftlang:release/5.7 Jun 22, 2022
@ahoppen ahoppen deleted the pr-5.7/close-folding-ranges branch June 22, 2022 15:43
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