Initial implementation of nimsuggest v3 (#19826) [backport] #19892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rework
nimsuggest
to use caching to make usage of ide commands more efficient.Previously, all commands no matter what the state of the process is were causing
clean build. In the context of Language Server Protocol(LSP) and lsp clients
this was causing perf issues and overall instability. Overall, the goal of v3 is
to fit to LSP Server needs
added two new commands:
recompile
to do clean compilationchanged
which can be used by the IDEs to notify that a particular file has been changed.The later can be utilized when using LSP file watches.
globalSymbols
- searching global referencesadded
segfaults
dependency to allow fallback to clean build when incrementalfails. I wish the error to be propagated to the client so we can work on fixing
the incremental build failures (typically hitting pointer)
more efficient rebuild flow. ATM incremental rebuild is triggered when the
command needs that(i. e. it is global) while the commands that work on the
current source rebuild only it
Things missing in this PR:
Although functional I still see this more as a POC that this approach can work.
Next steps:
sug
request.Ideally we will need push events, diagnostics should be restructored to allow
per file notifications, etc.
Add tests for v3 and implement ideSug
Remove typeInstCache/procInstCache cleanup
Add ideChkFile command
Avoid contains call when adding symbol info
Remove log
Remove segfaults