This commit is contained in:
Ayaz Hafiz 2022-11-30 21:19:54 -06:00
parent 70ead37ade
commit 289b1ea35a
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 9 additions and 0 deletions

View file

@ -147,6 +147,12 @@ pub(crate) mod diag {
LoadingProblem::IncorrectModuleName(_) => {
msg = format!("Incorrect module name");
}
LoadingProblem::CouldNotFindCacheDir => {
msg = format!(
"Could not find Roc cache directory {}",
roc_packaging::cache::roc_cache_dir().display()
);
}
};
Some(Diagnostic {

View file

@ -2,6 +2,7 @@ use std::collections::HashMap;
use bumpalo::Bump;
use roc_load::{LoadedModule, LoadingProblem};
use roc_packaging::cache::{self, RocCacheDir};
use roc_region::all::{LineInfo, Region};
use roc_reporting::report::RocDocAllocator;
use roc_types::subs::Variable;
@ -76,6 +77,7 @@ impl Document {
Default::default(),
roc_target::TargetInfo::default_x86_64(),
roc_reporting::report::RenderTarget::Generic,
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
roc_reporting::report::DEFAULT_PALETTE,
);