-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
serverRelated to the LSP serverRelated to the LSP server
Description
- I searched for
in:title ruff in:title panic - I have no idea how to reproduce the bug; it seems to happen at random
- Unfortunately I cannot provide a precise description of how I invoked ruff; it's starting as part of my absurdly complex Emacs setup. I have the emacs packages
lsp-mode,lsp-ui, andruff-formatinstalled (among many others) ~/config/ruff/pyproject.tomlcontains
[tool.ruff]
fix-only = true
line-length = 100
[tool.ruff.lint]
select = ["ALL"]
ignore = ["ANN", "COM812", "D", "ISC001", "TD"]
- the version is
ruff 0.6.5
Here's the output I see:
panicked at crates/ruff_source_file/src/line_index.rs:176:13:
index out of bounds: the len is 448 but the index is 450
0: std::backtrace::Backtrace::create
1: ruff_server::server::Server::run::{{closure}}
2: std::panicking::rust_panic_with_hook
3: std::panicking::begin_panic_handler::{{closure}}
4: std::sys::backtrace::__rust_end_short_backtrace
5: _rust_begin_unwind
6: core::panicking::panic_fmt
7: core::panicking::panic_bounds_check
8: ruff_source_file::line_index::LineIndex::line_range
9: <lsp_types::Range as ruff_server::edit::range::RangeExt>::to_text_range
10: ruff_server::edit::text_document::TextDocument::apply_changes
11: <ruff_server::server::api::notifications::did_change::DidChange as ruff_server::server::api::traits::SyncNotificationHandler>::run
12: core::ops::function::FnOnce::call_once{{vtable.shim}}
13: std::sys::backtrace::__rust_begin_short_backtrace
14: core::ops::function::FnOnce::call_once{{vtable.shim}}
15: std::sys::pal::unix::thread::Thread::new::thread_start
16: __pthread_deallocate
panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lsp-server-0.7.6/src/stdio.rs:28:37:
receiver was dropped, failed to send a message: "SendError(..)"
0: std::backtrace::Backtrace::create
1: ruff_server::server::Server::run::{{closure}}
2: std::panicking::rust_panic_with_hook
3: std::panicking::begin_panic_handler::{{closure}}
4: std::sys::backtrace::__rust_end_short_backtrace
5: _rust_begin_unwind
6: core::panicking::panic_fmt
7: core::result::unwrap_failed
8: std::sys::backtrace::__rust_begin_short_backtrace
9: core::ops::function::FnOnce::call_once{{vtable.shim}}
10: std::sys::pal::unix::thread::Thread::new::thread_start
11: __pthread_deallocate
panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jod-thread-0.1.2/src/lib.rs:33:22:
called `Result::unwrap()` on an `Err` value: Any { .. }
0: std::backtrace::Backtrace::create
1: ruff_server::server::Server::run::{{closure}}
2: std::panicking::rust_panic_with_hook
3: std::panicking::begin_panic_handler::{{closure}}
4: std::sys::backtrace::__rust_end_short_backtrace
5: _rust_begin_unwind
6: core::panicking::panic_fmt
7: core::result::unwrap_failed
8: ruff_server::server::Server::run
9: ruff::run
10: ruff::main
11: std::sys::backtrace::__rust_begin_short_backtrace
12: std::rt::lang_start::{{closure}}
13: std::rt::lang_start_internal
14: _main
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
serverRelated to the LSP serverRelated to the LSP server