mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
internal: do not drop errors from cargo metadata/check
Work towards #3155
This commit is contained in:
parent
047b531301
commit
aaa8c208b1
4 changed files with 60 additions and 51 deletions
|
@ -82,11 +82,16 @@ pub(crate) struct GlobalState {
|
|||
pub(crate) source_root_config: SourceRootConfig,
|
||||
pub(crate) proc_macro_client: Option<ProcMacroClient>,
|
||||
|
||||
/// For both `workspaces` and `workspace_build_data`, the field stores the
|
||||
/// data we actually use, while the `OpQueue` stores the result of the last
|
||||
/// fetch.
|
||||
///
|
||||
/// If the fetch (partially) fails, we do not update the values.
|
||||
pub(crate) workspaces: Arc<Vec<ProjectWorkspace>>,
|
||||
pub(crate) fetch_workspaces_queue: OpQueue<(), ()>,
|
||||
|
||||
pub(crate) fetch_workspaces_queue: OpQueue<(), Vec<anyhow::Result<ProjectWorkspace>>>,
|
||||
pub(crate) workspace_build_data: Option<BuildDataResult>,
|
||||
pub(crate) fetch_build_data_queue: OpQueue<BuildDataCollector, ()>,
|
||||
pub(crate) fetch_build_data_queue:
|
||||
OpQueue<BuildDataCollector, Option<anyhow::Result<BuildDataResult>>>,
|
||||
|
||||
latest_requests: Arc<RwLock<LatestRequests>>,
|
||||
}
|
||||
|
@ -140,10 +145,12 @@ impl GlobalState {
|
|||
status: Status::default(),
|
||||
source_root_config: SourceRootConfig::default(),
|
||||
proc_macro_client: None,
|
||||
|
||||
workspaces: Arc::new(Vec::new()),
|
||||
fetch_workspaces_queue: OpQueue::default(),
|
||||
workspace_build_data: None,
|
||||
fetch_build_data_queue: OpQueue::default(),
|
||||
|
||||
latest_requests: Default::default(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue