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

Vscode error #29

Closed
gohryt opened this issue Apr 5, 2021 · 7 comments
Closed

Vscode error #29

gohryt opened this issue Apr 5, 2021 · 7 comments

Comments

@gohryt
Copy link

gohryt commented Apr 5, 2021

I installed ols and vscode addon, added ols to path, but when i trying to type something it gives me this:

[Error - 4:30:56 PM] error in parse file for indexing /home/gohryt/Resources/Odin/Odin/core/builtin/builtin.odin
[Error - 4:30:56 PM] error in parse file for indexing /home/gohryt/Resources/Odin/Odin/core/intrinsics/intrinsics.odin
/home/gohryt/Resources/Odin/ols/src/server/analysis.odin(2373:31) Index -1 is out of bounds range 0:107
[Info - 4:31:03 PM] Connection to server got closed. Server will restart.
[Error - 4:31:03 PM] Request textDocument/completion failed.
Error: Connection got disposed.
at Object.dispose (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
at Object.dispose (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/common/client.js:74:35)
at LanguageClient.handleConnectionClosed (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/common/client.js:2408:42)
at LanguageClient.handleConnectionClosed (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/node/main.js:155:15)
at closeHandler (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/common/client.js:2395:18)
at CallbackList.invoke (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at closeHandler (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/connection.js:256:26)
at CallbackList.invoke (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at StreamMessageWriter.fireClose (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js:42:27)
at Socket. (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js:75:42)
at Socket.emit (events.js:315:20)
at Pipe. (net.js:674:12)
[Error - 4:31:03 PM] error in parse file for indexing /home/gohryt/Resources/Odin/Odin/core/builtin/builtin.odin
[Error - 4:31:04 PM] error in parse file for indexing /home/gohryt/Resources/Odin/Odin/core/intrinsics/intrinsics.odin
/home/gohryt/Resources/Odin/ols/src/server/analysis.odin(2373:31) Index -1 is out of bounds range 0:107
[Info - 4:31:06 PM] Connection to server got closed. Server will restart.
[Error - 4:31:06 PM] Request textDocument/completion failed.
Error: Connection got disposed.
at Object.dispose (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
at Object.dispose (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/common/client.js:74:35)
at LanguageClient.handleConnectionClosed (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/common/client.js:2408:42)
at LanguageClient.handleConnectionClosed (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/node/main.js:155:15)
at closeHandler (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-languageclient/lib/common/client.js:2395:18)
at CallbackList.invoke (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at closeHandler (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/connection.js:256:26)
at CallbackList.invoke (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at StreamMessageReader.fireClose (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js:40:27)
at Socket. (/home/gohryt/.vscode/extensions/danielgavin.ols-1.0.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js:125:42)
at Socket.emit (events.js:327:22)
at Pipe. (net.js:674:12)
[Error - 4:31:06 PM] error in parse file for indexing /home/gohryt/Resources/Odin/Odin/core/builtin/builtin.odin
[Error - 4:31:06 PM] error in parse file for indexing /home/gohryt/Resources/Odin/Odin/core/intrinsics/intrinsics.odin

my ols.json wich i placed to project folder is:

{
"collections": [{ "name": "core", "path": "/home/gohryt/Resources/Odin/Odin/core" },
{ "name": "shared", "path": "/home/gohryt/Projects/Bomb" }],
"thread_pool_count": 4,
"enable_document_symbols": true,
"enable_semantic_tokens": false,
"enable_hover": true,
"enable_global_std": true,
"verbose": true
}

@DanielGavin
Copy link
Owner

DanielGavin commented Apr 5, 2021

It looks like you are using Linux/MacOS. Right now Odin has two backends and the newer one is not supported on those platforms.

I'm waiting for this issue to be resolved: odin-lang/Odin#891

This mentions some weeks, but as soon as this is resolved, I'll ensure it works on Linux.

@DanielGavin
Copy link
Owner

It should now work on Linux.

@gohryt
Copy link
Author

gohryt commented May 4, 2021

it now gives
/home/gohryt/Resources/Odin/core/runtime/dynamic_map_internal.odin(349:2) runtime assertion
[Info - 10:59:58 PM] Connection to server got closed. Server will restart.
/home/gohryt/Resources/Odin/core/runtime/dynamic_map_internal.odin(349:2) runtime assertion
[Info - 10:59:58 PM] Connection to server got closed. Server will restart.
/home/gohryt/Resources/Odin/core/runtime/dynamic_map_internal.odin(349:2) runtime assertion
[Info - 10:59:58 PM] Connection to server got closed. Server will restart.
/home/gohryt/Resources/Odin/core/runtime/dynamic_map_internal.odin(349:2) runtime assertion
[Info - 10:59:58 PM] Connection to server got closed. Server will restart.
/home/gohryt/Resources/Odin/core/runtime/dynamic_map_internal.odin(349:2) runtime assertion
[Error - 10:59:58 PM] Connection to server got closed. Server will not be restarted.

@DanielGavin
Copy link
Owner

Yeah same for me on Linux now.

This was not an error that happened last time I tried it. Linux is a second class citizen right now on Odin, and It seems related to a bug in the compiler that only happens on Linux. I have been trying to make a simple reproduction of the error, but so far no luck.

You might be lucky if it works with opt:0 flags, but I'm not really sure it will.

I'll reopen the issue again.

@DanielGavin DanielGavin reopened this May 4, 2021
@gohryt
Copy link
Author

gohryt commented May 4, 2021

With opt:0 it works correctly

@DanielGavin
Copy link
Owner

@gohryt I have removed a flag that seemed to cause issues with Linux. It should hopefully now run on your machine with opt:2.

@gohryt
Copy link
Author

gohryt commented May 9, 2021

yes, now it works correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants