From d2477f780630a812bfd65e3987b70c0d309385bb Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 10 Feb 2024 10:02:31 -0500 Subject: fix: cache bust jsr deps on constraint failure (#22372) Removes the `FileFetcher`'s internal cache because I don't believe it's necessary (we already cache this kind of stuff in places like deno_graph or config files in different places). Removing it fixes this bug because this functionality was already implemented in deno_graph and lowers memory usage of the CLI a little bit. --- cli/tools/run/mod.rs | 4 ++-- cli/tools/test/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/tools') diff --git a/cli/tools/run/mod.rs b/cli/tools/run/mod.rs index ffb26f2eb..0de852fc2 100644 --- a/cli/tools/run/mod.rs +++ b/cli/tools/run/mod.rs @@ -91,7 +91,7 @@ pub async fn run_from_stdin(flags: Flags) -> Result { std::io::stdin().read_to_end(&mut source)?; // Save a fake file into file fetcher cache // to allow module access by TS compiler - file_fetcher.insert_cached(File { + file_fetcher.insert_memory_files(File { specifier: main_module.clone(), maybe_headers: None, source: source.into(), @@ -174,7 +174,7 @@ pub async fn eval_command( // Save a fake file into file fetcher cache // to allow module access by TS compiler. - file_fetcher.insert_cached(File { + file_fetcher.insert_memory_files(File { specifier: main_module.clone(), maybe_headers: None, source: source_code.into_bytes().into(), diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index c138abec2..2cf663b5f 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -873,7 +873,7 @@ pub async fn check_specifiers( .collect(); for file in inline_files { - file_fetcher.insert_cached(file); + file_fetcher.insert_memory_files(file); } module_load_preparer -- cgit v1.2.3