| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Fix infinite recursion introduced in 7031ea6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calls; simplify compilation pipeline (#21444)
* abolish using passes in the compiler; simplify compilation pipeline
* duplicate code
* Really cool to have the same signature...
* haul
* unify other backends
* refactor process
* introduce PipelinePhase
* refactor compiler
* fixes passes
* fixes nimsuggest
* add a sentinel
* enable docs checkj
* activate doc testing
* clean up
* complete cleanups
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented level based macro expand functionality
- it can handle single macro call or expand whole function/proc/etc and it
- In addition, I have altered the parser to provide the endInfo for the node.
The usefulness of the `endInfo` is not limited to the `expandMacro`
functionality but also it is useful for `ideOutline` functionality and I have
altered the ideOutline functionality to use `endInfo`. Note `endInfo` most of
the time is lost during the AST transformation thus in `nimsuggest.nim` I am
using freshly parsed tree to get the location information.
* Make sure we stop expanding correctly
* Test CI
* Fix tv3_outline.nim
|
|
|
|
|
|
|
| |
* Add testcase
* Define the backend symbol
* Remove unneeded whitespace
|
|
|
|
|
|
|
|
|
| |
* rename `std/threads` to `std/oldthreads`
* fixes tests
* rename to `typedthreads`
* changelog
|
|
|
| |
becase -> because
|
|
|
|
|
|
|
|
|
|
|
| |
* put `std/threads` under the umbrella of `nimPreviewSlimSystem`
* add changelog
* fixes tests
* fixes tests again
* fixes tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix/improve handling of forward declarations in nimsuggest
- ideUse now works fine when invoked on the implementation
- implemented ideDeclaration to make cover lsp feature textDocument/declaration
- fixed performance issue related to deduplicating symbols. Now the
deduplication happens after the symbols are filtered. As a alternative we might
change the way cached symbols are stored(e. g. use set).
- I also fixed the way globalSymbols work. Now it will sort the responses based
on the match location to make sure that the results are sorted in user friendly way.
* Update nimsuggest/nimsuggest.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
| |
- apparently TLineInfo's implementation of `==` ignores the column. After I fixed
the code to use exact TLineInfo comparison I fixed several other issues hidden
by that issue.
- Replaced `tuple[sym, info]` with `SymInfoPair`
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement type command
- this will be mapped to textDocument/typeDefinition in LSP protocol. It will be
very useful for `nim` in particular because typically most of the time the type
is inferred.
* Update nimsuggest/nimsuggest.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial implementation of nimsuggest v3
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 compilation
- `changed` 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 references
- added `segfaults` dependency to allow fallback to clean build when incremental
fails. 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:
- Documentation
- Extensive unit testing.
Although functional I still see this more as a POC that this approach can work.
Next steps:
- Implement `sug` request.
- Rework/extend the protocol to allow better client/server communication.
Ideally we will need push events, diagnostics should be restructored to allow
per file notifications, etc.
- implement v3 test suite.
- better logging
* 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
|
|
|
|
| |
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cleanups
* ast.nim: cleanups
* IC: no more sym.tab field, stored externally in the module graph
* nimble compiles again
* rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly
* rodfiles: added compilerproc and export sections
* rodfiles: added all the missing sections
* rodfiles: track the missing information
* IC: architecture for lazy loading of proc bodies
* make tests green again
* completed the lazy loading of proc bodies
* symbol lookup integration, part 1
* symbol lookup integration, part 2
* symbol lookup integration, part 3
* make tcompilerapi work again
* rodfiles: fixed config change handling
|
| |
|
|
|
|
| |
reality (#16057)
|
| |
|
|
|
| |
* fix a bug that prevented nim doc compiler/nim on windows
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit a974684b149faa19645f1e18b7b11aa67f169997.
The CRLF was to separate between each response, and removing them causes
the responses to not be splitted correctly.
I didn't notice that it was in a loop when I made the #13545.
|
|
|
| |
This is already sent by replTcp after the message is sent.
|
| |
|
|
|
|
|
|
|
| |
This can be used to let nimsuggest users know which project is
nimsuggest being in charge of, so they can know when should a new
nimsuggest instance be spawned.
An additional feature is to debug the project file finding feature.
|
| |
|
|
|
|
|
|
|
|
| |
Same as e9fa4c9b9c8e2926449399a69a02676936bb842c, but for the epc
backend which is used by emacs and vscode plugin.
Since the EPC backend only deal with one connection per nimsuggest
instance, only one socket is leaked, thus not as servere as with the tcp
backend.
|
|
|
|
|
|
| |
A new socket is created for each iteration and leak immediately thanks
to the accept() call replacing the created socket with the client socket.
This commit fixes that.
|
| |
|
| |
|
|
|
|
|
|
| |
The default starting parameters for `line` and `col` were switched.
See line 141: "line starts at 1, column at 0, dirtyfile is optional".
Also, in `TLineInfo` object, `line` is uint16, `col` is int16.
|
| |
|
|
|
|
| |
allows for more convenient debugging
|
|
|
| |
fixes #6199
|
| |
|
|
|
|
|
|
|
|
| |
* nimsuggest: prevent out-of-bound access
* fixes nim-lang/nimsuggest#76
* undo tester changes
|
|
|
|
|
|
|
|
| |
* Moved some code around in nimsuggest to avoid crash when run as library
* Moved the common executecallback setting to a procedure
* Fixed slight issue
|
|
|
|
|
|
| |
* Made nimsuggest importable as a library and add Nim-path override option
* Remove leftover debug output
|
| |
|
|
|
|
| |
between modules
|
|
|
|
|
|
|
|
|
| |
searched / run (#8682)
* run project config.nims if exists, then inputfile.nims if exists
* ~/.config/nim/config.nims can now be used
* also check in getSystemConfigPath for config.nims
* refactor handleCmdLine for nim and nimsuggest
|
| |
|
|
|
|
| |
conventions outlined in NEP-1
|
| |
|
| |
|
| |
|
|
|
|
| |
around explicitly
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|