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

Subscribe to updates of module.calls data #909

Merged
merged 8 commits into from
May 9, 2022
Merged

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented May 4, 2022

Adds support for a client to register a command that will refresh clide side data based on changes the server has detected in the workspace.

This specifically adds a new command to refresh the module calls shown client side. The existing Module hook system is used to detect changes in the workspace and notify the client that data has changed.

Adds support for a client to register a command that will refresh clide side data based on changes the server has detected in the workspace.

This specifically adds a new command to refresh the module calls shown client side. The existing Module hook system is used to detect changes in the workspace and notify the client that data has changed.
@jpogran jpogran added this to the v0.28.0 milestone May 4, 2022
@jpogran jpogran added the enhancement New feature or request label May 4, 2022
@jpogran jpogran self-assigned this May 4, 2022
@jpogran jpogran linked an issue May 4, 2022 that may be closed by this pull request
@jpogran jpogran marked this pull request as ready for review May 4, 2022 14:56
@jpogran jpogran requested a review from a team as a code owner May 4, 2022 14:56
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Just one suggestion and two questions in-line.

internal/langserver/handlers/initialize.go Outdated Show resolved Hide resolved
internal/langserver/handlers/service.go Outdated Show resolved Hide resolved
internal/langserver/handlers/handlers_test.go Show resolved Hide resolved
jpogran and others added 2 commits May 4, 2022 11:35
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Works great!

I did notice the effect of hashicorp/terraform#30005 while testing this, but adding a new module & init worked great. We can avoid that upstream issue probably entirely as part of #725

docs/commands.md Outdated
@@ -184,3 +184,53 @@ installed version.
}
}
```

# Client Side Commands
Copy link
Member

Choose a reason for hiding this comment

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

I didn't realize when we were discussing this on Slack that you meant implementation notes for LS maintainers - apologies! You were right that this isn't the best place as this is primarily for client-side maintainers. 😄

We don't have any content for server maintainers yet, aside from the architecture doc. Would you mind copying this into a new one then? You can probably link it from the architecture doc.

We could call it language-server.md, to align the name with https://github.com/hashicorp/terraform-ls/blob/main/docs/language-clients.md

Copy link
Member

Choose a reason for hiding this comment

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

That said I think that some brief docs for client maintainers would be still helpful here, perhaps 1 section to describe the refresh mechanism in general and/or mention of the relevant capability under each relevant command.

@jpogran jpogran merged commit 16c915b into main May 9, 2022
@jpogran jpogran deleted the gh-722-refresh-module-calls branch May 9, 2022 16:32
@github-actions
Copy link

github-actions bot commented Jun 9, 2022

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 Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow subscribing to updates of module.calls data
2 participants