diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-02-10 10:02:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 10:02:31 -0500 |
commit | d2477f780630a812bfd65e3987b70c0d309385bb (patch) | |
tree | aa3dcdff8929c724beeb6c5ade8bc0207fa8a516 /cli/tools/run/mod.rs | |
parent | 34c8d1714026501a0d4907b7311006fadb25fcdf (diff) |
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.
Diffstat (limited to 'cli/tools/run/mod.rs')
-rw-r--r-- | cli/tools/run/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<i32, AnyError> { 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(), |