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

@ -16,6 +16,7 @@ roc_reporting = { path = "../reporting" }
roc_solve_problem = { path = "../compiler/solve_problem" } roc_solve_problem = { path = "../compiler/solve_problem" }
roc_target = { path = "../compiler/roc_target" } roc_target = { path = "../compiler/roc_target" }
roc_types = { path = "../compiler/types" } roc_types = { path = "../compiler/types" }
roc_packaging = {path = "../packaging"}
bumpalo = { version = "3.8.0", features = ["collections"] } bumpalo = { version = "3.8.0", features = ["collections"] }

View file

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

View file

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