Skip to content
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

context: Replace RPCContextData with DocumentContext #1427

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Sep 29, 2023

This ensures that we propagate the language ID between job scheduling and execution, which in turn enables #1404 at runtime (and not just in unit tests).

While I am labelling this as a bug, it's a bug that was never surfaced to the user in a release, so it does not need to be mentioned in the Changelog AFAICT.

@radeksimko radeksimko added bug Something isn't working performance Gotta go fast labels Sep 29, 2023
@radeksimko radeksimko self-assigned this Sep 29, 2023
@@ -38,8 +37,6 @@ func (svc *service) TextDocumentDidOpen(ctx context.Context, params lsp.DidOpenT
return err
}

ctx = lsctx.WithLanguageId(ctx, params.TextDocument.LanguageID)
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know if there's actually any other method that has the same structure that will benefit from this but given that we already do some unmarshaling prior to passing the request to the handler I assume we may as well unmarshal the LanguageID there instead of here.

@radeksimko radeksimko marked this pull request as ready for review September 29, 2023 13:14
@radeksimko radeksimko requested a review from a team as a code owner September 29, 2023 13:14
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

👍

@radeksimko radeksimko merged commit a5f749e into main Sep 29, 2023
@radeksimko radeksimko deleted the f-document-ctx branch September 29, 2023 13:59
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working performance Gotta go fast
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants