Scale progress down

There are two reasons why we don't want a generic ra_progress crate
just yet:

*First*, it introduces a common interface between separate components,
and that is usually undesirable (b/c components start to fit the
interface, rather than doing what makes most sense for each particular
component).

*Second*, it introduces a separate async channel for progress, which
makes it harder to correlate progress reports with the work done. Ie,
when we see 100% progress, it's not blindly obvious that the work has
actually finished, we might have some pending messages still.
This commit is contained in:
Aleksey Kladov
2020-06-25 08:01:03 +02:00
parent 76a530242a
commit 874a5f80c7
11 changed files with 101 additions and 353 deletions

View File

@@ -29,16 +29,14 @@ mod markdown;
mod diagnostics;
mod line_endings;
mod request_metrics;
mod lsp_utils;
pub mod lsp_ext;
pub mod config;
use serde::de::DeserializeOwned;
pub type Result<T, E = Box<dyn std::error::Error + Send + Sync>> = std::result::Result<T, E>;
pub use crate::{
caps::server_capabilities,
main_loop::{main_loop, show_message},
};
pub use crate::{caps::server_capabilities, lsp_utils::show_message, main_loop::main_loop};
use std::fmt;
pub fn from_json<T: DeserializeOwned>(what: &'static str, json: serde_json::Value) -> Result<T> {