diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2020-11-16 13:19:31 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-16 13:19:31 +1100 |
| commit | 37fbbf8101e7003d6de3d342db38fa9c55ab568f (patch) | |
| tree | 858dc6db9d06fe7feb99fba4156ffe9cb2575c63 /cli/program_state.rs | |
| parent | 1079e59cf4df4a463d6114dc7eefe5809aa880b7 (diff) | |
fix(cli): local sources are not cached in memory (#8328)
Fixes #4743
Closes #5253
Fixes #5631
Fixes #6116
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Diffstat (limited to 'cli/program_state.rs')
| -rw-r--r-- | cli/program_state.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/program_state.rs b/cli/program_state.rs index 13477f3e8..023e2604d 100644 --- a/cli/program_state.rs +++ b/cli/program_state.rs @@ -188,7 +188,7 @@ impl ProgramState { // really should just be getting this from the module graph. let out = self .file_fetcher - .get_cached(&module_specifier) + .get_source(&module_specifier) .expect("Cached source file doesn't exist"); let specifier = out.specifier.clone(); @@ -323,7 +323,7 @@ impl SourceMapGetter for ProgramState { line_number: usize, ) -> Option<String> { if let Ok(specifier) = ModuleSpecifier::resolve_url(file_name) { - self.file_fetcher.get_cached(&specifier).map(|out| { + self.file_fetcher.get_source(&specifier).map(|out| { // Do NOT use .lines(): it skips the terminating empty line. // (due to internally using .split_terminator() instead of .split()) let lines: Vec<&str> = out.source.split('\n').collect(); |
