rust-lang / rust-lang/rust-analyzer
Option to disable or at least debounce crate graph loading progress messages
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I still get lots of progress reports, sometimes dozens in a single millisecond.
$ rust-analyzer --version
rust-analyzer fc628cfc8 2021-12-12 dev
Here is the log with timestamps (look for $/progress).
The log is the result of opening kak-lsp's src/main.rs in Kakoune, starting the language server (with lsp-enable) and waiting a bit.
The log statement WARN Progress report arrived too fast, dropping occurs whenever a $/progress with "kind":"report" was received withing 50ms of a previous one.
Let me know if you need steps to reproduce (we still haven't switched the default config to rust-analyzer but will soon).
Dec 14 16:19:44.796 INFO Starting main event loop, module: kak_lsp::session:28
Dec 14 16:19:44.797 DEBG Searching for vars starting with KAK_LSP_PROJECT_ROOT_RUST, module: kak_lsp::project_root:58
Dec 14 16:19:44.798 INFO Found project root "/home/johannes/git/kak-lsp" because it contains "Cargo.toml", module: kak_lsp::project_root:41
Dec 14 16:19:44.798 DEBG Routing editor request to Route { session: "583642", language: "rust", root: "/home/johannes/git/kak-lsp" }, module: kak_lsp::session:94
Dec 14 16:19:44.798 DEBG Spawning a new controller for Route { session: "583642", language: "rust", root: "/home/johannes/git/kak-lsp" }, module: kak_lsp::session:116
Dec 14 16:19:44.799 INFO Starting Language server `sh -c if path=$(rustup which rust-analyzer 2>/dev/null); then
"$path"
else
rust-analyzer
fi
`, module: kak_lsp::language_server_transport:20
Dec 14 16:19:44.800 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-get-config '/tmp/kak-lsp/johannes/f71e4e0083c894eb', module: kak_lsp::editor_transport:80
Dec 14 16:19:44.801 DEBG lsp_config:
, module: kak_lsp::settings:58
Dec 14 16:19:44.802 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-get-server-initialization-options '/tmp/kak-lsp/johannes/249ad6a99425be6b', module: kak_lsp::editor_transport:80
Dec 14 16:19:44.811 DEBG lsp_server_initialization_options:
, module: kak_lsp::settings:90
Dec 14 16:19:44.814 DEBG To server: {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"markdown":{"parser":"kak-lsp","version":"11.1.0-snapshot"}},"offsetEncoding":["utf-8","utf-16"],"textDocument":{"callHierarchy":{"dynamicRegistration":false},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":false,"isPreferredSupport":false,"resolveSupport":{"properties":[]}},"codeLens":{"dynamicRegistration":false},"colorProvider":{"dynamicRegistration":false},"completion":{"completionItem":{"commitCharactersSupport":false,"deprecatedSupport":false,"documentationFormat":["markdown","plaintext"],"preselectSupport":false,"resolveSupport":{"properties":["additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":false,"dynamicRegistration":false},"declaration":{"dynamicRegistration":false,"linkSupport":false},"definition":{"dynamicRegistration":false,"linkSupport":false},"documentHighlight":{"dynamicRegistration":false},"documentLink":{"dynamicRegistration":false,"tooltipSupport":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":false},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":false},"implementation":{"dynamicRegistration":false,"linkSupport":false},"onTypeFormatting":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false},"rangeFormatting":{"dynamicRegistration":false},"references":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false,"prepareSupport":false},"selectionRange":{},"semanticTokens":{"dynamicRegistration":false,"formats":["relative"],"requests":{"full":true,"range":false},"tokenModifiers":["documentation","constant","readonly"],"tokenTypes":["string","namespace","variable","keyword","function","comment","type","operator"]},"signatureHelp":{"contextSupport":false,"dynamicRegistration":false,"signatureInformation":{"documentationFormat":["plaintext"],"parameterInformation":{"labelOffsetSupport":false}}},"synchronization":{"didSave":true,"dynamicRegistration":false,"willSave":false,"willSaveWaitUntil":false},"typeDefinition":{"dynamicRegistration":false,"linkSupport":false}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":false,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceEdit":{"changeAnnotationSupport":{},"documentChanges":true,"failureHandling":"abort","normalizesLineEndings":false,"resourceOperations":["create","delete","rename"]},"workspaceFolders":false}},"clientInfo":{"name":"kak-lsp","version":"11.1.0-snapshot"},"initializationOptions":{"cargo":{"loadOutDirsFromCheck":true},"diagnostics":{"disabled":["unresolved-proc-macro"]},"hoverActions":{"enable":false},"procMacro":{"enable":true}},"processId":583863,"rootPath":"/home/johannes/git/kak-lsp","rootUri":"file:///home/johannes/git/kak-lsp","trace":"off"},"id":0}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:44.850 DEBG From editor:
session = "583642"
buffile = "/home/johannes/git/kak-lsp/src/main.rs"
filetype = "rust"
version = 1
method = "textDocument/didChange"
[params]
draft = """
#![allow(clippy::unused_unit)]
#[macro_use]
extern crate enum_primitive;
#[macro_use]
extern crate serde_derive;
extern crate slog;
#[macro_use]
extern crate slog_scope;
mod context;
mod controller;
mod diagnostics;
mod editor_transport;
mod general;
mod language_features;
mod language_server_transport;
mod markup;
mod position;
mod progress;
mod project_root;
mod session;
mod settings;
mod text_edit;
mod text_sync;
mod thread_worker;
mod types;
mod util;
mod workspace;
use crate::types::*;
use crate::util::*;
use clap::{crate_version, App, Arg, ArgMatches};
use daemonize::Daemonize;
use itertools::Itertools;
use sloggers::file::FileLoggerBuilder;
use sloggers::terminal::{Destination, TerminalLoggerBuilder};
use sloggers::types::Severity;
use sloggers::Build;
use std::borrow::Cow;
use std::env;
use std::fs;
use std::io::{stdin, Read, Write};
use std::os::unix::net::UnixStream;
use std::panic;
use std::path::Path;
use std::process::{Command, Stdio};
fn main() {
let matches = App::new(\"kak-lsp\")
.version(crate_version!())
.author(\"Ruslan Prokopchuk <fer.obbee@gmail.com>\")
.about(\"Kakoune Language Server Protocol Client\")
.arg(
Arg::with_name(\"kakoune\")
.long(\"kakoune\")
.help(\"Generate commands for Kakoune to plug in kak-lsp\"),
)
.arg(
Arg::with_name(\"request\")
.long(\"request\")
.help(\"Forward stdin to kak-lsp server\"),
)
.arg(
Arg::with_name(\"config\")
.short(\"c\")
.long(\"config\")
.value_name(\"FILE\")
.help(\"Read config from FILE\")
.takes_value(true),
)
.arg(
Arg::with_name(\"daemonize\")
.short(\"d\")
.long(\"daemonize\")
.help(\"Daemonize kak-lsp process (server only)\"),
)
.arg(
Arg::with_name(\"session\")
.short(\"s\")
.long(\"session\")
.value_name(\"SESSION\")
.help(\"Session id to communicate via unix socket\")
.takes_value(true)
.required(true),
)
.arg(
Arg::with_name(\"timeout\")
.short(\"t\")
.long(\"timeout\")
.value_name(\"TIMEOUT\")
.help(\"Session timeout in seconds (default 1800)\")
.takes_value(true),
)
.arg(
Arg::with_name(\"initial-request\")
.long(\"initial-request\")
.help(\"Read initial request from stdin\"),
)
.arg(
Arg::with_name(\"v\")
.short(\"v\")
.multiple(true)
.help(\"Sets the level of verbosity (use up to 4 times)\"),
)
.arg(
Arg::with_name(\"log\")
.long(\"log\")
.value_name(\"PATH\")
.help(\"File to write the log into instead of stderr\")
.takes_value(true),
)
.get_matches();
if matches.is_present(\"kakoune\") {
return kakoune();
}
let mut config = include_str!(\"../kak-lsp.toml\").to_string();
let config_path = matches
.value_of(\"config\")
.map(|config| Path::new(&config).to_owned())
.or_else(|| {
dirs::config_dir().and_then(|config_dir| {
let path = Path::new(&config_dir.join(\"kak-lsp/kak-lsp.toml\")).to_owned();
if path.exists() {
Some(path)
} else {
None
}
})
});
if let Some(config_path) = config_path {
config = fs::read_to_string(config_path).expect(\"Failed to read config\");
}
let session = String::from(matches.value_of(\"session\").unwrap());
let mut config: Config = match toml::from_str(&config) {
Ok(cfg) => cfg,
Err(err) => {
consume_stdin_and_report_config_error(&matches, &session, &err);
panic!(\"invalid configuration: {}\", err)
}
};
config.server.session = session;
if let Some(timeout) = matches.value_of(\"timeout\") {
config.server.timeout = timeout.parse().unwrap();
}
if matches.is_present(\"request\") {
request(&config);
} else {
// It's important to read input before daemonizing even if we don't use it.
// Otherwise it will be empty.
let initial_request = if matches.is_present(\"initial-request\") {
let mut input = Vec::new();
stdin()
.read_to_end(&mut input)
.expect(\"Failed to read stdin\");
Some(String::from_utf8_lossy(&input).to_string())
} else {
None
};
let mut pid_path = util::temp_dir();
pid_path.push(format!(\"{}.pid\", config.server.session));
if matches.is_present(\"daemonize\") {
if let Err(e) = Daemonize::new()
.pid_file(&pid_path)
.working_directory(std::env::current_dir().unwrap())
.start()
{
println!(\"Failed to daemonize process: {:?}\", e);
goodbye(&config.server.session, 1);
}
}
// Setting up the logger after potential daemonization,
// otherwise it refuses to work properly.
let _guard = setup_logger(&config, &matches);
let code = session::start(&config, initial_request);
goodbye(&config.server.session, code);
}
}
fn kakoune() {
let script: &str = include_str!(\"../rc/lsp.kak\");
let args = env::args()
.skip(1)
.filter(|arg| arg != \"--kakoune\")
.join(\" \");
let cmd = env::current_exe().unwrap();
let cmd = cmd.to_str().unwrap();
let lsp_cmd = format!(
\"set global lsp_cmd '{} {}'\",
editor_escape(cmd),
editor_escape(&args)
);
println!(\"{}\\n{}\", script, lsp_cmd);
}
fn request(config: &Config) {
let mut input = Vec::new();
stdin()
.read_to_end(&mut input)
.expect(\"Failed to read stdin\");
let mut path = util::temp_dir();
path.push(&config.server.session);
if let Ok(mut stream) = UnixStream::connect(&path) {
stream
.write_all(&input)
.expect(\"Failed to send stdin to server\");
} else {
spin_up_server(&input);
}
}
fn spin_up_server(input: &[u8]) {
let args = env::args()
.filter(|arg| arg != \"--request\")
.collect::<Vec<_>>();
let mut cmd = Command::new(&args[0]);
let mut child = cmd
.args(&args[1..])
.args(&[\"--daemonize\", \"--initial-request\"])
.stdin(Stdio::piped())
.spawn()
.expect(\"Failed to run server\");
child
.stdin
.as_mut()
.unwrap()
.write_all(input)
.expect(\"Failed to write initial request\");
child.wait().expect(\"Failed to daemonize server\");
}
fn setup_logger(config: &Config, matches: &clap::ArgMatches<'_>) -> slog_scope::GlobalLoggerGuard {
let mut verbosity = matches.occurrences_of(\"v\") as u8;
if verbosity == 0 {
verbosity = config.verbosity
}
let level = match verbosity {
0 => Severity::Error,
1 => Severity::Warning,
2 => Severity::Info,
3 => Severity::Debug,
_ => Severity::Trace,
};
let logger = if let Some(log_path) = matches.value_of(\"log\") {
let mut builder = FileLoggerBuilder::new(log_path);
builder.level(level);
builder.build().unwrap()
} else {
let mut builder = TerminalLoggerBuilder::new();
builder.level(level);
builder.destination(Destination::Stderr);
builder.build().unwrap()
};
panic::set_hook(Box::new(|panic_info| {
error!(\"panic: {}\", panic_info);
}));
slog_scope::set_global_logger(logger)
}
fn consume_stdin_and_report_config_error(
matches: &ArgMatches,
session: &str,
error: &toml::de::Error,
) {
if !matches.is_present(\"initial-request\") && !matches.is_present(\"request\") {
return; // Don't know how to reach the editor.
}
let mut input = Vec::new();
stdin()
.read_to_end(&mut input)
.expect(\"Failed to read stdin\");
let data = String::from_utf8_lossy(&input).to_string();
let request: EditorRequest = toml::from_str(&data).expect(\"Failed to parse request\");
assert!(request.meta.session == session);
let editor = match editor_transport::start(session, None) {
Ok(ed) => ed,
Err(_code) => return,
};
let command = format!(
\"lsp-show-error {}\",
editor_quote(&format!(\"failed to parse config file: {}\", error)),
);
if editor
.to_editor
.sender()
.send(EditorResponse {
meta: request.meta,
command: Cow::from(command),
})
.is_err()
{
error!(\"Failed to send command to editor\");
}
}
"""
, module: kak_lsp::editor_transport:129
Dec 14 16:19:44.850 DEBG Searching for vars starting with KAK_LSP_PROJECT_ROOT_RUST, module: kak_lsp::project_root:58
Dec 14 16:19:44.850 INFO Found project root "/home/johannes/git/kak-lsp" because it contains "Cargo.toml", module: kak_lsp::project_root:41
Dec 14 16:19:44.850 DEBG Routing editor request to Route { session: "583642", language: "rust", root: "/home/johannes/git/kak-lsp" }, module: kak_lsp::session:94
Dec 14 16:19:44.851 DEBG Language server is not initialized, parking request, module: kak_lsp::controller:99
Dec 14 16:19:44.892 DEBG From server: {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"selectionRangeProvider":true,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[":",".","'"]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite"],"resolveProvider":true},"codeLensProvider":{"resolveProvider":true},"documentFormattingProvider":true,"documentRangeFormattingProvider":false,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"=","moreTriggerCharacter":[".",">","{"]},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"declarationProvider":true,"workspace":{"fileOperations":{"willRename":{"filters":[{"scheme":"file","pattern":{"glob":"**/*.rs","matches":"file"}},{"scheme":"file","pattern":{"glob":"**","matches":"folder"}}]}}},"callHierarchyProvider":true,"semanticTokensProvider":{"legend":{"tokenTypes":["comment","keyword","string","number","regexp","operator","namespace","type","struct","class","interface","enum","enumMember","typeParameter","function","method","property","macro","variable","parameter","angle","arithmetic","attribute","attributeBracket","bitwise","boolean","brace","bracket","builtinAttribute","builtinType","character","colon","comma","comparison","constParameter","derive","dot","escapeSequence","formatSpecifier","generic","label","lifetime","logical","operator","parenthesis","punctuation","selfKeyword","semicolon","typeAlias","toolModule","union","unresolvedReference"],"tokenModifiers":["documentation","declaration","definition","static","abstract","deprecated","readonly","defaultLibrary","async","attribute","callable","constant","consuming","controlFlow","crateRoot","injected","intraDocLink","library","mutable","public","reference","trait","unsafe"]},"range":true,"full":{"delta":true}},"experimental":{"joinLines":true,"openCargoToml":true,"ssr":true,"onEnter":true,"parentModule":true,"hoverRange":true,"runnables":{"kinds":["cargo"]},"workspaceSymbolScopeKindFiltering":true}},"serverInfo":{"name":"rust-analyzer","version":"fc628cfc8 2021-12-12 dev"},"offsetEncoding":"utf-8"}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:44.893 DEBG To server: {"jsonrpc":"2.0","method":"initialized","params":{}}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:44.894 DEBG From server: {"jsonrpc":"2.0","id":0,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Fetching"}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:44.895 DEBG lsp_config:
, module: kak_lsp::settings:58
Dec 14 16:19:44.896 DEBG To server: {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"rust","text":"#![allow(clippy::unused_unit)]\n\n#[macro_use]\nextern crate enum_primitive;\n#[macro_use]\nextern crate serde_derive;\nextern crate slog;\n#[macro_use]\nextern crate slog_scope;\n\nmod context;\nmod controller;\nmod diagnostics;\nmod editor_transport;\nmod general;\nmod language_features;\nmod language_server_transport;\nmod markup;\nmod position;\nmod progress;\nmod project_root;\nmod session;\nmod settings;\nmod text_edit;\nmod text_sync;\nmod thread_worker;\nmod types;\nmod util;\nmod workspace;\n\nuse crate::types::*;\nuse crate::util::*;\nuse clap::{crate_version, App, Arg, ArgMatches};\nuse daemonize::Daemonize;\nuse itertools::Itertools;\nuse sloggers::file::FileLoggerBuilder;\nuse sloggers::terminal::{Destination, TerminalLoggerBuilder};\nuse sloggers::types::Severity;\nuse sloggers::Build;\nuse std::borrow::Cow;\nuse std::env;\nuse std::fs;\nuse std::io::{stdin, Read, Write};\nuse std::os::unix::net::UnixStream;\nuse std::panic;\nuse std::path::Path;\nuse std::process::{Command, Stdio};\n\nfn main() {\n let matches = App::new(\"kak-lsp\")\n .version(crate_version!())\n .author(\"Ruslan Prokopchuk <fer.obbee@gmail.com>\")\n .about(\"Kakoune Language Server Protocol Client\")\n .arg(\n Arg::with_name(\"kakoune\")\n .long(\"kakoune\")\n .help(\"Generate commands for Kakoune to plug in kak-lsp\"),\n )\n .arg(\n Arg::with_name(\"request\")\n .long(\"request\")\n .help(\"Forward stdin to kak-lsp server\"),\n )\n .arg(\n Arg::with_name(\"config\")\n .short(\"c\")\n .long(\"config\")\n .value_name(\"FILE\")\n .help(\"Read config from FILE\")\n .takes_value(true),\n )\n .arg(\n Arg::with_name(\"daemonize\")\n .short(\"d\")\n .long(\"daemonize\")\n .help(\"Daemonize kak-lsp process (server only)\"),\n )\n .arg(\n Arg::with_name(\"session\")\n .short(\"s\")\n .long(\"session\")\n .value_name(\"SESSION\")\n .help(\"Session id to communicate via unix socket\")\n .takes_value(true)\n .required(true),\n )\n .arg(\n Arg::with_name(\"timeout\")\n .short(\"t\")\n .long(\"timeout\")\n .value_name(\"TIMEOUT\")\n .help(\"Session timeout in seconds (default 1800)\")\n .takes_value(true),\n )\n .arg(\n Arg::with_name(\"initial-request\")\n .long(\"initial-request\")\n .help(\"Read initial request from stdin\"),\n )\n .arg(\n Arg::with_name(\"v\")\n .short(\"v\")\n .multiple(true)\n .help(\"Sets the level of verbosity (use up to 4 times)\"),\n )\n .arg(\n Arg::with_name(\"log\")\n .long(\"log\")\n .value_name(\"PATH\")\n .help(\"File to write the log into instead of stderr\")\n .takes_value(true),\n )\n .get_matches();\n\n if matches.is_present(\"kakoune\") {\n return kakoune();\n }\n\n let mut config = include_str!(\"../kak-lsp.toml\").to_string();\n\n let config_path = matches\n .value_of(\"config\")\n .map(|config| Path::new(&config).to_owned())\n .or_else(|| {\n dirs::config_dir().and_then(|config_dir| {\n let path = Path::new(&config_dir.join(\"kak-lsp/kak-lsp.toml\")).to_owned();\n if path.exists() {\n Some(path)\n } else {\n None\n }\n })\n });\n\n if let Some(config_path) = config_path {\n config = fs::read_to_string(config_path).expect(\"Failed to read config\");\n }\n\n let session = String::from(matches.value_of(\"session\").unwrap());\n\n let mut config: Config = match toml::from_str(&config) {\n Ok(cfg) => cfg,\n Err(err) => {\n consume_stdin_and_report_config_error(&matches, &session, &err);\n panic!(\"invalid configuration: {}\", err)\n }\n };\n\n config.server.session = session;\n\n if let Some(timeout) = matches.value_of(\"timeout\") {\n config.server.timeout = timeout.parse().unwrap();\n }\n\n if matches.is_present(\"request\") {\n request(&config);\n } else {\n // It's important to read input before daemonizing even if we don't use it.\n // Otherwise it will be empty.\n let initial_request = if matches.is_present(\"initial-request\") {\n let mut input = Vec::new();\n stdin()\n .read_to_end(&mut input)\n .expect(\"Failed to read stdin\");\n Some(String::from_utf8_lossy(&input).to_string())\n } else {\n None\n };\n let mut pid_path = util::temp_dir();\n pid_path.push(format!(\"{}.pid\", config.server.session));\n if matches.is_present(\"daemonize\") {\n if let Err(e) = Daemonize::new()\n .pid_file(&pid_path)\n .working_directory(std::env::current_dir().unwrap())\n .start()\n {\n println!(\"Failed to daemonize process: {:?}\", e);\n goodbye(&config.server.session, 1);\n }\n }\n // Setting up the logger after potential daemonization,\n // otherwise it refuses to work properly.\n let _guard = setup_logger(&config, &matches);\n let code = session::start(&config, initial_request);\n goodbye(&config.server.session, code);\n }\n}\n\nfn kakoune() {\n let script: &str = include_str!(\"../rc/lsp.kak\");\n let args = env::args()\n .skip(1)\n .filter(|arg| arg != \"--kakoune\")\n .join(\" \");\n let cmd = env::current_exe().unwrap();\n let cmd = cmd.to_str().unwrap();\n let lsp_cmd = format!(\n \"set global lsp_cmd '{} {}'\",\n editor_escape(cmd),\n editor_escape(&args)\n );\n println!(\"{}\\n{}\", script, lsp_cmd);\n}\n\nfn request(config: &Config) {\n let mut input = Vec::new();\n stdin()\n .read_to_end(&mut input)\n .expect(\"Failed to read stdin\");\n let mut path = util::temp_dir();\n path.push(&config.server.session);\n if let Ok(mut stream) = UnixStream::connect(&path) {\n stream\n .write_all(&input)\n .expect(\"Failed to send stdin to server\");\n } else {\n spin_up_server(&input);\n }\n}\n\nfn spin_up_server(input: &[u8]) {\n let args = env::args()\n .filter(|arg| arg != \"--request\")\n .collect::<Vec<_>>();\n let mut cmd = Command::new(&args[0]);\n let mut child = cmd\n .args(&args[1..])\n .args(&[\"--daemonize\", \"--initial-request\"])\n .stdin(Stdio::piped())\n .spawn()\n .expect(\"Failed to run server\");\n child\n .stdin\n .as_mut()\n .unwrap()\n .write_all(input)\n .expect(\"Failed to write initial request\");\n child.wait().expect(\"Failed to daemonize server\");\n}\n\nfn setup_logger(config: &Config, matches: &clap::ArgMatches<'_>) -> slog_scope::GlobalLoggerGuard {\n let mut verbosity = matches.occurrences_of(\"v\") as u8;\n\n if verbosity == 0 {\n verbosity = config.verbosity\n }\n\n let level = match verbosity {\n 0 => Severity::Error,\n 1 => Severity::Warning,\n 2 => Severity::Info,\n 3 => Severity::Debug,\n _ => Severity::Trace,\n };\n\n let logger = if let Some(log_path) = matches.value_of(\"log\") {\n let mut builder = FileLoggerBuilder::new(log_path);\n builder.level(level);\n builder.build().unwrap()\n } else {\n let mut builder = TerminalLoggerBuilder::new();\n builder.level(level);\n builder.destination(Destination::Stderr);\n builder.build().unwrap()\n };\n\n panic::set_hook(Box::new(|panic_info| {\n error!(\"panic: {}\", panic_info);\n }));\n\n slog_scope::set_global_logger(logger)\n}\n\nfn consume_stdin_and_report_config_error(\n matches: &ArgMatches,\n session: &str,\n error: &toml::de::Error,\n) {\n if !matches.is_present(\"initial-request\") && !matches.is_present(\"request\") {\n return; // Don't know how to reach the editor.\n }\n\n let mut input = Vec::new();\n stdin()\n .read_to_end(&mut input)\n .expect(\"Failed to read stdin\");\n\n let data = String::from_utf8_lossy(&input).to_string();\n let request: EditorRequest = toml::from_str(&data).expect(\"Failed to parse request\");\n assert!(request.meta.session == session);\n\n let editor = match editor_transport::start(session, None) {\n Ok(ed) => ed,\n Err(_code) => return,\n };\n let command = format!(\n \"lsp-show-error {}\",\n editor_quote(&format!(\"failed to parse config file: {}\", error)),\n );\n if editor\n .to_editor\n .sender()\n .send(EditorResponse {\n meta: request.meta,\n command: Cow::from(command),\n })\n .is_err()\n {\n error!(\"Failed to send command to editor\");\n }\n}\n","uri":"file:///home/johannes/git/kak-lsp/src/main.rs","version":1}}}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:44.896 DEBG To server: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:44.896 DEBG To server: {"jsonrpc":"2.0","result":null,"id":0}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:44.898 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"begin","title":"Fetching"}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:44.898 DEBG From server: {"jsonrpc":"2.0","id":1,"method":"workspace/configuration","params":{"items":[{"section":"rust-analyzer"}]}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:44.899 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Fetching' 'Fetching' false '' '' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:44.901 DEBG To editor `583642`: lsp-get-config '/tmp/kak-lsp/johannes/acbc4ee45477feaf', module: kak_lsp::editor_transport:84
Dec 14 16:19:44.906 DEBG lsp_config:
, module: kak_lsp::settings:58
Dec 14 16:19:44.906 DEBG To server: {"jsonrpc":"2.0","result":[{"cargo":{"loadOutDirsFromCheck":true},"diagnostics":{"disabled":["unresolved-proc-macro"]},"hoverActions":{"enable":false},"procMacro":{"enable":true}}],"id":1}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:45.162 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"report","message":"metadata"}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.162 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Fetching' 'Fetching' false 'metadata' '' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.594 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"end"}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.595 DEBG From server: {"jsonrpc":"2.0","id":2,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Roots Scanned"}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.595 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"begin","title":"Roots Scanned","message":"0/106","percentage":0}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.595 DEBG To server: {"jsonrpc":"2.0","result":null,"id":2}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:45.596 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"1/106","percentage":0}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.596 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"2/106","percentage":1}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.596 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.597 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"3/106","percentage":2}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.598 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"4/106","percentage":3}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.598 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.598 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.599 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"5/106","percentage":4}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.599 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"6/106","percentage":5}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.599 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.599 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.600 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"7/106","percentage":6}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.600 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"8/106","percentage":7}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.600 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.601 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.602 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"9/106","percentage":8}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.602 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"10/106","percentage":9}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.602 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.602 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.603 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"11/106","percentage":10}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.603 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.604 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"12/106","percentage":11}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.604 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"13/106","percentage":12}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.604 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"14/106","percentage":13}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"15/106","percentage":14}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"16/106","percentage":15}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"17/106","percentage":16}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"18/106","percentage":16}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"19/106","percentage":17}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"20/106","percentage":18}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"21/106","percentage":19}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"22/106","percentage":20}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"23/106","percentage":21}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"24/106","percentage":22}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"25/106","percentage":23}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"26/106","percentage":24}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"27/106","percentage":25}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"28/106","percentage":26}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.609 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.610 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.612 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"29/106","percentage":27}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.613 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"30/106","percentage":28}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"31/106","percentage":29}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"32/106","percentage":30}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"33/106","percentage":31}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"34/106","percentage":32}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"35/106","percentage":33}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"36/106","percentage":33}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"37/106","percentage":34}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.623 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"38/106","percentage":35}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.624 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"39/106","percentage":36}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.624 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"40/106","percentage":37}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.624 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.625 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.635 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Fetching' 'Fetching' false '' '100' true, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.643 DEBG From server: {"jsonrpc":"2.0","id":3,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Fetching"}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.644 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Fetching","value":{"kind":"begin","title":"Fetching"}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.644 DEBG To server: {"jsonrpc":"2.0","result":null,"id":3}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:45.644 DEBG From server: {"jsonrpc":"2.0","id":4,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Loading"}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.644 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Loading","value":{"kind":"begin","title":"Loading"}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.644 DEBG To server: {"jsonrpc":"2.0","result":null,"id":4}, module: kak_lsp::language_server_transport:177
Dec 14 16:19:45.644 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"41/106","percentage":38}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.651 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"42/106","percentage":39}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.652 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.653 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"43/106","percentage":40}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.654 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"44/106","percentage":41}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.654 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.654 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.655 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"45/106","percentage":42}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.656 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"46/106","percentage":43}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.656 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.662 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Roots Scanned' 'Roots Scanned' false '0/106' '0' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.662 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.663 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"47/106","percentage":44}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.663 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"48/106","percentage":45}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.664 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.664 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.710 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"49/106","percentage":46}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.711 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"50/106","percentage":47}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.711 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.711 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Roots Scanned' 'Roots Scanned' false '1/106' '0' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.712 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"51/106","percentage":48}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.713 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"52/106","percentage":49}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.713 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.718 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.718 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"53/106","percentage":50}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.718 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.719 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"54/106","percentage":50}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.719 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.719 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"55/106","percentage":51}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.719 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.720 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"56/106","percentage":52}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.720 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.720 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"57/106","percentage":53}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.720 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.720 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"58/106","percentage":54}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.721 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.721 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"59/106","percentage":55}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.721 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.721 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"60/106","percentage":56}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.722 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.722 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"61/106","percentage":57}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.722 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.722 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"62/106","percentage":58}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.722 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.723 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"63/106","percentage":59}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.723 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"64/106","percentage":60}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.723 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.723 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.724 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"65/106","percentage":61}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.724 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"66/106","percentage":62}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.724 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.724 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.729 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"67/106","percentage":63}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.729 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"68/106","percentage":64}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.729 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.729 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.750 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Fetching' 'Fetching' false '' '' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.766 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Loading' 'Loading' false '' '' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.778 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"69/106","percentage":65}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.779 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"70/106","percentage":66}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.779 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"71/106","percentage":66}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.779 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.779 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.788 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Roots Scanned' 'Roots Scanned' false '41/106' '38' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.788 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"72/106","percentage":67}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.788 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"73/106","percentage":68}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.789 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.789 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.795 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Roots Scanned' 'Roots Scanned' false '49/106' '46' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.803 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"74/106","percentage":69}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.804 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"75/106","percentage":70}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.805 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.805 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.806 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"76/106","percentage":71}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.806 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"77/106","percentage":72}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.806 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"78/106","percentage":73}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.806 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"79/106","percentage":74}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.807 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"80/106","percentage":75}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.807 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"81/106","percentage":76}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.808 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"82/106","percentage":77}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.808 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"83/106","percentage":78}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.808 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"84/106","percentage":79}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.809 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"85/106","percentage":80}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.809 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"86/106","percentage":81}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.809 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"87/106","percentage":82}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.810 DEBG To editor `583642`: eval -client client0 -verbatim -- lsp-handle-progress 'rustAnalyzer/Roots Scanned' 'Roots Scanned' false '69/106' '65' false, module: kak_lsp::editor_transport:80
Dec 14 16:19:45.810 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"88/106","percentage":83}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.810 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"89/106","percentage":83}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.810 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"90/106","percentage":84}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.810 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"91/106","percentage":85}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.811 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"92/106","percentage":86}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.811 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"93/106","percentage":87}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.811 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"94/106","percentage":88}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.812 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"95/106","percentage":89}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.812 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"96/106","percentage":90}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.812 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"97/106","percentage":91}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.813 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"98/106","percentage":92}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.813 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"99/106","percentage":93}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.814 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"100/106","percentage":94}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.814 DEBG From server: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Roots Scanned","value":{"kind":"report","message":"101/106","percentage":95}}}, module: kak_lsp::language_server_transport:151
Dec 14 16:19:45.816 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.816 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.817 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.817 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.817 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.817 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.817 WARN Progress report arrived too fast, dropping, module: kak_lsp::progress:104
Dec 14 16:19:45.817 WARN Progres
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report by opening kak-lsp's src/main.rs in Kakoune and starting rust-analyzer, then inspect the logged $/progress messages and their timestamps. Determine whether the completed change should disable these reports or debounce them, and verify that progress messages no longer arrive in bursts while language-server startup still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100