Revert "sum_tree: Replace rayon with futures (#41586) (#41846)

This causes the background executor to hang

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-11-03 19:25:15 +00:00
committed by GitHub
parent cb5055aaec
commit 5fc54986c7
67 changed files with 650 additions and 1287 deletions
+3 -6
View File
@@ -170,10 +170,7 @@ impl CommitView {
ReplicaId::LOCAL,
cx.entity_id().as_non_zero_u64().into(),
LineEnding::default(),
Rope::from_str(
&format_commit(&commit, stash.is_some()),
cx.background_executor(),
),
format_commit(&commit, stash.is_some()).into(),
);
metadata_buffer_id = Some(buffer.remote_id());
Buffer::build(buffer, Some(file.clone()), Capability::ReadWrite)
@@ -339,7 +336,7 @@ async fn build_buffer(
) -> Result<Entity<Buffer>> {
let line_ending = LineEnding::detect(&text);
LineEnding::normalize(&mut text);
let text = Rope::from_str(&text, cx.background_executor());
let text = Rope::from(text);
let language = cx.update(|cx| language_registry.language_for_file(&blob, Some(&text), cx))?;
let language = if let Some(language) = language {
language_registry
@@ -379,7 +376,7 @@ async fn build_buffer_diff(
let base_buffer = cx
.update(|cx| {
Buffer::build_snapshot(
Rope::from_str(old_text.as_deref().unwrap_or(""), cx.background_executor()),
old_text.as_deref().unwrap_or("").into(),
buffer.language().cloned(),
Some(language_registry.clone()),
cx,