дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 17:21:13 +02:00
fix(index,app): desktop body for project_roots and a type alias for validated files
Цей коміт міститься в:
1 джерело
06fab1b237
коміт
f2869643b7
3 files changed
+12
-2
No files matched your search
@@ -335,7 +335,7 @@ impl Shared {
|
||||
by_dir.entry(dir).or_default().push(i);
|
||||
}
|
||||
let by_dir: Vec<(&str, Vec<usize>)> = by_dir.into_iter().collect();
|
||||
let entries: Option<Vec<Vec<(FileEntry, Vec<StoredSymbol>)>>> = INDEX_POOL.install(|| {
|
||||
let entries: Option<Vec<Vec<Indexed>>> = INDEX_POOL.install(|| {
|
||||
by_dir
|
||||
.par_iter()
|
||||
.map(|(dir, files)| {
|
||||
@@ -1149,6 +1149,9 @@ impl Shared {
|
||||
|
||||
type ContentHash = [u8; 32];
|
||||
|
||||
/// A file validated on a warm start, with its stored symbols.
|
||||
type Indexed = (FileEntry, Vec<StoredSymbol>);
|
||||
|
||||
/// `Some(prev_hash)` when `f` is missing or stale in `d` (`None` inner hash when
|
||||
/// the file must be parsed fresh); `None` when `d` is already current for `f`.
|
||||
fn prev_hash_if_stale(d: &IndexData, f: &Found) -> Option<Option<ContentHash>> {
|
||||
|
||||
@@ -387,6 +387,13 @@ pub(crate) fn project_current(window: Window) -> Option<ProjectInfo> {
|
||||
state.project(window.label()).ok().filter(|p| !p.light).map(|p| project_info(&p))
|
||||
}
|
||||
|
||||
// Off the IPC thread: Gradle source roots may walk the project for builds, slow on a network share.
|
||||
pub(crate) fn project_roots(window: Window) -> IdeResult<ide_workspace::ProjectRoots> {
|
||||
let state = window.state::<AppState>();
|
||||
state.note_ipc();
|
||||
ide_host::ops::project::project_roots(&state.host, window.label())
|
||||
}
|
||||
|
||||
// Off the IPC thread: each member's `for_project().layer(Project)` re-parses both settings layers
|
||||
// and validates the merge against the whole `Settings` type, which a debug build's stack-heavy
|
||||
// recursion can overflow from the WebView2 callback (see the `settings_set` note above).
|
||||
|
||||
@@ -42,7 +42,7 @@ use std::sync::LazyLock;
|
||||
// Desktop bodies of project-host commands (`#[command(desktop_body = …)]`), which their derived
|
||||
// adapters call.
|
||||
use app::{
|
||||
close_project, open_project, project_current, project_trust_remove_location, project_trust_set,
|
||||
close_project, open_project, project_current, project_roots, project_trust_remove_location, project_trust_set,
|
||||
project_workspace_member_set, project_workspace_members, settings_get, settings_removed_theme, settings_set,
|
||||
};
|
||||
use doc::doc_edit;
|
||||
|
||||
Reference in new issue
Заблокувати користувача