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
+12 -32
View File
@@ -276,8 +276,8 @@ mod tests {
use util::{path, rel_path::rel_path};
use worktree::WorktreeSettings;
#[gpui::test]
fn test_parse_conflicts_in_buffer(cx: &mut TestAppContext) {
#[test]
fn test_parse_conflicts_in_buffer() {
// Create a buffer with conflict markers
let test_content = r#"
This is some text before the conflict.
@@ -299,12 +299,7 @@ mod tests {
.unindent();
let buffer_id = BufferId::new(1).unwrap();
let buffer = Buffer::new(
ReplicaId::LOCAL,
buffer_id,
test_content,
cx.background_executor(),
);
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content);
let snapshot = buffer.snapshot();
let conflict_snapshot = ConflictSet::parse(&snapshot);
@@ -360,8 +355,8 @@ mod tests {
assert_eq!(conflicts_in_range.len(), 0);
}
#[gpui::test]
fn test_nested_conflict_markers(cx: &mut TestAppContext) {
#[test]
fn test_nested_conflict_markers() {
// Create a buffer with nested conflict markers
let test_content = r#"
This is some text before the conflict.
@@ -379,12 +374,7 @@ mod tests {
.unindent();
let buffer_id = BufferId::new(1).unwrap();
let buffer = Buffer::new(
ReplicaId::LOCAL,
buffer_id,
test_content,
cx.background_executor(),
);
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content);
let snapshot = buffer.snapshot();
let conflict_snapshot = ConflictSet::parse(&snapshot);
@@ -406,8 +396,8 @@ mod tests {
assert_eq!(their_text, "This is their version in a nested conflict\n");
}
#[gpui::test]
fn test_conflict_markers_at_eof(cx: &mut TestAppContext) {
#[test]
fn test_conflict_markers_at_eof() {
let test_content = r#"
<<<<<<< ours
=======
@@ -415,20 +405,15 @@ mod tests {
>>>>>>> "#
.unindent();
let buffer_id = BufferId::new(1).unwrap();
let buffer = Buffer::new(
ReplicaId::LOCAL,
buffer_id,
test_content,
cx.background_executor(),
);
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content);
let snapshot = buffer.snapshot();
let conflict_snapshot = ConflictSet::parse(&snapshot);
assert_eq!(conflict_snapshot.conflicts.len(), 1);
}
#[gpui::test]
fn test_conflicts_in_range(cx: &mut TestAppContext) {
#[test]
fn test_conflicts_in_range() {
// Create a buffer with conflict markers
let test_content = r#"
one
@@ -462,12 +447,7 @@ mod tests {
.unindent();
let buffer_id = BufferId::new(1).unwrap();
let buffer = Buffer::new(
ReplicaId::LOCAL,
buffer_id,
test_content.clone(),
cx.background_executor(),
);
let buffer = Buffer::new(ReplicaId::LOCAL, buffer_id, test_content.clone());
let snapshot = buffer.snapshot();
let conflict_snapshot = ConflictSet::parse(&snapshot);