Skip to content

Commit

Permalink
feat: run project compilations on main thread (#1197)
Browse files Browse the repository at this point in the history
* dev: handle compile interrupt

* dev: remove cache task use

* feat: create project crate again

dev: changes

feat: delete unused code

fix: errors

fix: errors

* feat: extra compilation is not needed

* dev: implement all todos

* fix: make event queue unbounded

* fix: make preview work again

* feat: event-driven recompilation

* feat: evict vfs cache

* feat: update evict strategy

* feat: remove lock update
  • Loading branch information
Myriad-Dreamin authored Jan 19, 2025
1 parent 02a14c9 commit e4bf2e9
Show file tree
Hide file tree
Showing 30 changed files with 1,890 additions and 1,773 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/sync-lsp/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
thread,
};

use crossbeam_channel::{bounded, Receiver, Sender};
use crossbeam_channel::{bounded, unbounded, Receiver, Sender};

use crate::{Connection, ConnectionRx, ConnectionTx, Message};

Expand Down Expand Up @@ -67,7 +67,7 @@ pub fn with_stdio_transport(
};
let o = || std::io::stdout().lock();

let (event_sender, event_receiver) = bounded::<crate::Event>(10);
let (event_sender, event_receiver) = unbounded::<crate::Event>();

// Create the transport. Includes the stdio (stdin and stdout) versions but this
// could also be implemented to use sockets or HTTP.
Expand Down
1 change: 1 addition & 0 deletions crates/tinymist-project/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ parking_lot.workspace = true
pathdiff.workspace = true
tokio.workspace = true
rayon.workspace = true
reflexo-typst.workspace = true
semver.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
Loading

0 comments on commit e4bf2e9

Please sign in to comment.