Properly pass around roc_cache_dir during loading

This commit is contained in:
Richard Feldman 2022-11-20 11:05:53 -05:00
parent 033422b358
commit d6fa2acc54
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
3 changed files with 77 additions and 9 deletions

View file

@ -107,8 +107,13 @@ pub fn load_and_monomorphize(
) -> Result<MonomorphizedModule<'_>, LoadMonomorphizedError<'_>> {
use LoadResult::*;
let load_start =
LoadStart::from_path(arena, filename, load_config.render, load_config.palette)?;
let load_start = LoadStart::from_path(
arena,
filename,
load_config.render,
roc_cache_dir,
load_config.palette,
)?;
match load(arena, load_start, exposed_types, load_config)? {
Monomorphized(module) => Ok(module),
@ -124,8 +129,13 @@ pub fn load_and_typecheck(
) -> Result<LoadedModule, LoadingProblem<'_>> {
use LoadResult::*;
let load_start =
LoadStart::from_path(arena, filename, load_config.render, load_config.palette)?;
let load_start = LoadStart::from_path(
arena,
filename,
load_config.render,
roc_cache_dir,
load_config.palette,
)?;
match load(arena, load_start, exposed_types, load_config)? {
Monomorphized(_) => unreachable!(""),