summaryrefslogtreecommitdiff
path: root/cli/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'cli/compilers')
-rw-r--r--cli/compilers/ts.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs
index c78d7ef57..0e3e5c26c 100644
--- a/cli/compilers/ts.rs
+++ b/cli/compilers/ts.rs
@@ -455,7 +455,7 @@ impl TsCompiler {
///
/// Along compiled file a special metadata file is saved as well containing
/// hash that can be validated to avoid unnecessary recompilation.
- async fn cache_compiled_file(
+ fn cache_compiled_file(
&self,
module_specifier: &ModuleSpecifier,
contents: &str,
@@ -468,7 +468,6 @@ impl TsCompiler {
let source_file = self
.file_fetcher
.fetch_cached_source_file(&module_specifier)
- .await
.expect("Source file not found");
let version_hash = source_code_version_hash(
@@ -528,7 +527,7 @@ impl TsCompiler {
}
/// This method is called by TS compiler via an "op".
- pub async fn cache_compiler_output(
+ pub fn cache_compiler_output(
&self,
module_specifier: &ModuleSpecifier,
extension: &str,
@@ -536,7 +535,7 @@ impl TsCompiler {
) -> std::io::Result<()> {
match extension {
".map" => self.cache_source_map(module_specifier, contents),
- ".js" => self.cache_compiled_file(module_specifier, contents).await,
+ ".js" => self.cache_compiled_file(module_specifier, contents),
_ => unreachable!(),
}
}
@@ -578,10 +577,9 @@ impl TsCompiler {
script_name: &str,
) -> Option<SourceFile> {
if let Some(module_specifier) = self.try_to_resolve(script_name) {
- let fut = self
+ return self
.file_fetcher
.fetch_cached_source_file(&module_specifier);
- return futures::executor::block_on(fut);
}
None