zed/crates/gpui2
Piotr Osiewicz 0f7fc8c1a0 fix display map tests
These tests failed due to an indefinite hang in buffer.condition in the following code:
\`\`\`rust
    let buffer = cx
        .add_model(|cx| Buffer::new(0, cx.model_id() as u64, text).with_language(language, cx));
    buffer.condition(cx, |buf, _| !buf.is_parsing()).await;
`\`\`
In both gpui1 and gpui2 \`.with_language\` spawns a task that notifies the context once it's done. The \`condition\` waits for notifications to be raised. The gist of the problem was that in gpui2, the spawned task was scheduled straight away, so we never really saw the notification with \`condition\`, causing us to wait indefinitely. This is probably a difference in test between schedulers in gpui1 and gpui2, but I kind of sidestepped the issue by spawning a condition before firing off a parsing task with \`set_language\`.
2023-12-04 13:14:03 +01:00
..
docs Document contexts 2023-11-14 19:52:51 -07:00
src fix display map tests 2023-12-04 13:14:03 +01:00
tests Re-implement actions as derive macros instead of blanket impls 2023-11-16 17:32:02 -08:00
build.rs Introduce surface rendering 2023-11-28 16:47:31 +01:00
Cargo.toml Update Taffy to latest main 2023-11-18 21:30:33 -07:00