Open
Description
Affected versions
- vscode-nim version: 1.4.1
- nimlangserver versions:
- 1.6.0
- 1.8.1
- nim version: 2.0.14
- nimble versions tried (from shell env in VSCode PATH at least):
- 0.13.1
- 0.16.4
❯ nimble --version
Info: Using the environment variable: NIMBLE_DIR='/Users/egonat/repos/codex-storage/nim-codex/vendor/.nimble'
nimble v0.16.4 compiled at 2025-01-31 02:30:26
git hash: 4e7e646b9819b72044e5262c2800e9f7ccfd1b16
My assumption is that the configuration is incorrect, however I do see some "RegEx matched` messages:
This plugin almost never works for me when working inside of an NBS project, could that be the cause of the issue?
In settings, we have:
"nim.projectMapping": [
{
"projectFile": "/Users/egonat/repos/codex-storage/nim-codex/tests/testCodex.nim",
"fileRegex": "tests/codex/.*\\.nim"
},
{
"projectFile": "/Users/egonat/repos/codex-storage/nim-codex/tests/testIntegration.nim",
"fileRegex": "tests/integration/.*\\.nim"
},
{
"projectFile": "/Users/egonat/repos/codex-storage/nim-codex/codex.nim",
"fileRegex": "codex/.*\\.nim"
}
],
Output:
DBG Starting nimlangserver version=1.8.1 params="(clientProcessId: none(int), transport: some(stdio), port: 0)"
DBG Starting stdio server
DBG [Processsing Message] request="\"initialize\""
DBG Initialize received...
DBG Registering monitor for process pid=49553
DBG Initialize completed. Trying to start nimsuggest instances
DBG [Processsing Message] request="\"initialized\""
DBG Client initialized.
DBG Requesting configuration from the client
DBG [Processsing Message] request="\"textDocument/didOpen\""
DBG New document opened for URI: uri=file:///Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG Auto-guessing project file for file=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG getProjectFile project=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim fileUri=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG Document associated with the following projectFile uri=file:///Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim projectFile=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG Will create nimsuggest for this file uri=file:///Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG Starting createOrRestartNimsuggest projectFile=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim uri=file:///Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG Using {nimVersion} nimVersion="Nim Compiler Version 2.0.14 [MacOSX: arm64]"
DBG Creating new nimsuggest project projectFile=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
INF Starting nimsuggest root=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim timeout=120000 path=/Users/egonat/repos/codex-storage/nim-codex/vendor/nimbus-build-system/vendor/Nim/bin/nimsuggest workingDir=/Users/egonat/repos/codex-storage/nim-codex
DBG Parsing nimsuggest capability capability=con
DBG Nimsuggest Capabilities capabilities={con}
ERR NimSuggest Error (stderr) err="SIGSEGV: Illegal storage access. (Attempt to read from nil?)\n"
DBG NimSuggest needed to be restarted due to an error
WRN Server stopped. projectFile=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG ShowMessage message="Server failed with SIGSEGV: Illegal storage access. (Attempt to read from nil?)\n."
DBG Nimsuggest port portLine=
ERR Failed to parse nimsuggest port portLine=
ERR Nimsuggest nextLine nextLine=
DBG NimSuggest needed to be restarted due to an error
WRN Server stopped. projectFile=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG ShowMessage message="Server failed with Failed to parse nimsuggest port."
DBG ShowMessage message="Opening file:///Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim"
DBG Nimsuggest initialized successfully projectFile=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim
DBG ShowMessage message="Nimsuggest initialized for /Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim"
DBG processQueue size=1
DBG Nimsuggest is not working, returning empty result... port=0 command="known \"/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim\":0:0"
DBG ShowMessage message="/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim is not compiled as part of project /Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim.\n In orde to get the IDE features working you must either configure nim.projectMapping or import the module."
DBG [Processsing Message] request="\"extension/tasks\""
DBG Received tasks rootPath=/Users/egonat/repos/codex-storage/nim-codex
DBG Got response for the didChangeConfiguration registration: res={}
DBG Received the following configuration configuration="[{\"project\":[\"ethers.nim\"],\"projectMapping\":[{\"projectFile\":\"/Users/egonat/repos/codex-storage/nim-codex/tests/testCodex.nim\",\"fileRegex\":\"tests/codex/.*\\\\.nim\"},{\"projectFile\":\"/Users/egonat/repos/codex-storage/nim-codex/tests/testIntegration.nim\",\"fileRegex\":\"tests/integration/.*\\\\.nim\"},{\"projectFile\":\"/Users/egonat/repos/codex-storage/nim-codex/codex.nim\",\"fileRegex\":\"codex/.*\\\\.nim\"}],\"test-project\":\"\",\"buildOnSave\":false,\"buildCommand\":\"c\",\"runOutputDirectory\":\"\",\"lintOnSave\":false,\"enableNimsuggest\":false,\"provider\":\"lsp\",\"useNimsuggestCheck\":false,\"logNimsuggest\":false,\"licenseString\":\"\",\"nimsuggestRestartTimeout\":60,\"nimprettyIndent\":0,\"nimprettyMaxLineLen\":80,\"lsp\":{\"path\":\"/Users/egonat/.nimble/bin/nimlangserver\"},\"inlayHints\":{\"typeHints\":{\"enable\":false},\"parameterHints\":{\"enable\":true},\"exceptionHints\":{\"enable\":true,\"hintStringLeft\":\"🔔\",\"hintStringRight\":\"\"}},\"debug\":{\"type\":\"lldb\"},\"notificationVerbosity\":\"info\",\"notificationTimeout\":15,\"transportMode\":\"stdio\",\"lspPort\":0,\"formatOnSave\":true,\"useNimCheck\":true,\"nimExpandArc\":false,\"nimExpandMacro\":false,\"nimbleAutoSetup\":true}]"
DBG nimCheck filePath=/Users/egonat/repos/codex-storage/nim-codex/tests/integration/multinodes.nim nimPath=/Users/egonat/repos/codex-storage/nim-codex/vendor/nimbus-build-system/vendor/Nim/bin/nim_commit_bf4de6a394e040d9810cba8c69fb2829ff04dcc6
The SIGSEGV then continues to occur and no symbols are ever loaded.
Have tried multiple versions of fileRegex
, all with the same result, eg:
"fileRegex": "tests/integration/(.*).nim"
"fileRegex": "tests/integration/.*\\.nim"
"fileRegex": "tests\/integration\/.*\\.nim"
Have tried enabling nimcheck vs nimsuggest
Do you have any other info that may help us? All of us on my team are struggling to get this to work and it would be a huge boon for us if it did.
Metadata
Metadata
Assignees
Labels
No labels