mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
refactor(ts): remove op_cache (#5071)
This PR removes op_cache and refactors how Deno interacts with TS compiler. Ultimate goal is to completely sandbox TS compiler worker; it should operate on simple request -> response basis. With this commit TS compiler no longer caches compiled sources as they are generated but rather collects all sources and sends them back to Rust when compilation is done. Additionally "Diagnostic" and its children got refactored to use "Deserialize" trait instead of manually implementing JSON deserialization.
This commit is contained in:
parent
e574437922
commit
cf5a39a361
16 changed files with 348 additions and 503 deletions
|
@ -57,9 +57,6 @@ fn op_format_diagnostic(
|
|||
args: Value,
|
||||
_zero_copy: Option<ZeroCopyBuf>,
|
||||
) -> Result<JsonOp, OpError> {
|
||||
if let Some(diagnostic) = Diagnostic::from_json_value(&args) {
|
||||
Ok(JsonOp::Sync(json!(diagnostic.to_string())))
|
||||
} else {
|
||||
Err(OpError::type_error("bad diagnostic".to_string()))
|
||||
}
|
||||
let diagnostic = serde_json::from_value::<Diagnostic>(args)?;
|
||||
Ok(JsonOp::Sync(json!(diagnostic.to_string())))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue