You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework the module hooks, that only one is publishing diagnostics
Related LSP methods
textDocument/didSave
textDocument/didChange
textDocument/didOpen
References
No response
Help Wanted
I'm interested in contributing a fix myself
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
This may be more related to #1339 but one challenge with notifications triggered from didSave is that didSave generally does not make document changes, and hence it won't trigger the hooks currently.
This is kind of by design (at least within the LSP) but it does mean that we may have to find some way of synchronising didSave with hooks completion, in addition to persisting diagnostics (at least before they get published?).
The reason I think it's also related to #1339 is because there is other work than just diagnostic publishing (such as telemetry sending) that could also run less frequently, maybe on save or within N seconds after the last didChange, depending on which comes first.
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Language Server Version
v0.31.3
Problem Statement
We currently publish diagnostics from two different locations:
In a module hook
terraform-ls/internal/langserver/handlers/hooks_module.go
Lines 153 to 161 in b9eabdc
In the
didSave
handler when validate on save is enabledterraform-ls/internal/langserver/handlers/command/validate.go
Lines 70 to 75 in b9eabdc
With the introduction of early validation, we'll likely have a third location that won't have access to the diagnostics raised by
terraform valdiate
.Part of hashicorp/vscode-terraform#720
Attempted Solutions
No response
Proposal
Related LSP methods
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: