cairo
cairo copied to clipboard
bug: vscode language server implementation issue
Bug Report
Cairo version:
cairo-run 2.1.0
Current behavior:
While coding on vscode this warnings appear on output section
Using Scarb binary from: /home/nirnaeth/.local/bin/scarb
Cairo language server running from Scarb at: /home/nirnaeth/.local/bin/scarb
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete
Server stderr> file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Server stderr> Semantic analysis failed. File 'file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo' does not exist.
Semantic analysis failed. File 'file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo' does not exist.
Server stderr> Semantic analysis failed. File 'file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo' does not exist.
Server stderr> Semantic analysis failed. File 'file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo' does not exist.
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Server stderr> Caught panic in LSP worker thread.
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Caught panic in LSP worker thread.
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Caught panic in LSP worker thread.
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Server stderr> Caught panic in LSP worker thread.
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Caught panic in LSP worker thread.
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Caught panic in LSP worker thread.
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Server stderr> Caught panic in LSP worker thread.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Server stderr>
Caught panic in LSP worker thread.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-parser-2.0.2/src/parser.rs:1862:47
Server stderr> Caught panic in LSP worker thread.
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Complete file:///home/nirnaeth/cairo_projects/hello_scarb/src/hello_scarb.cairo
Server stderr> Hover file:///home/nirnaeth/cairo_projects/hello_scarb/src/lib.cairo
Any idea how to resolve this conflicts?
Can you check with scarb nightly?
After updating scarb to scarb 0.6.1+nightly-2023-08-16
(cairo-run 2.1.0) output is:
Using Scarb binary from: /home/mburaky/.local/bin/scarb
Cairo language server running from Scarb at: /home/mburaky/.local/bin/scarb
Server stderr> thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/git/checkouts/cairo-f086c7e6d4098a68/f42b647/crates/cairo-lang-semantic/src/corelib.rs:551:60
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Server stderr> Caught panic in LSP worker thread.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Hover failed. Failed to find module.
Can I take a jab at this issue?
Is this still happening?
Closing as this looks like a stale issue.