cairo icon indicating copy to clipboard operation
cairo copied to clipboard

bug: vscode language server implementation issue

Open nirnaeth-arnoediad opened this issue 1 year ago • 4 comments

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?

nirnaeth-arnoediad avatar Aug 11 '23 19:08 nirnaeth-arnoediad

Can you check with scarb nightly?

spapinistarkware avatar Aug 14 '23 08:08 spapinistarkware

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.

nirnaeth-arnoediad avatar Aug 16 '23 07:08 nirnaeth-arnoediad

Can I take a jab at this issue?

cwkang1998 avatar Oct 03 '23 12:10 cwkang1998

Is this still happening?

orizi avatar Jan 29 '24 08:01 orizi

Closing as this looks like a stale issue.

mkaput avatar Jun 19 '24 09:06 mkaput