mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-15 21:23:57 +00:00
update existing calls to roc_cache_dir()
using `roc_cache_packages_dir()` instead, which will return "~/.cache/roc/packages", which was the existing functionality, but `roc_cache_dir()` will now return "~/.cache/roc"
This commit is contained in:
parent
7c86cf026d
commit
3f318e2235
8 changed files with 14 additions and 14 deletions
|
|
@ -564,7 +564,7 @@ pub fn test(matches: &ArgMatches, target: Target) -> io::Result<i32> {
|
|||
arena,
|
||||
path.to_path_buf(),
|
||||
opt_main_path.cloned(),
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
load_config,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ fn main() -> io::Result<()> {
|
|||
BuildConfig::BuildAndRunIfNoErrors,
|
||||
Triple::host().into(),
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
LinkType::Executable,
|
||||
)
|
||||
} else {
|
||||
|
|
@ -64,7 +64,7 @@ fn main() -> io::Result<()> {
|
|||
BuildConfig::BuildAndRun,
|
||||
Triple::host().into(),
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
LinkType::Executable,
|
||||
)
|
||||
} else {
|
||||
|
|
@ -90,7 +90,7 @@ fn main() -> io::Result<()> {
|
|||
BuildConfig::BuildAndRunIfNoErrors,
|
||||
Triple::host().into(),
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
LinkType::Executable,
|
||||
)
|
||||
} else {
|
||||
|
|
@ -127,7 +127,7 @@ fn main() -> io::Result<()> {
|
|||
let function_kind = FunctionKind::from_env();
|
||||
roc_linker::generate_stub_lib(
|
||||
input_path,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
target,
|
||||
function_kind,
|
||||
);
|
||||
|
|
@ -199,7 +199,7 @@ fn main() -> io::Result<()> {
|
|||
BuildConfig::BuildOnly,
|
||||
target,
|
||||
out_path,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
link_type,
|
||||
)?)
|
||||
}
|
||||
|
|
@ -222,7 +222,7 @@ fn main() -> io::Result<()> {
|
|||
roc_file_path.to_owned(),
|
||||
opt_main_path.cloned(),
|
||||
emit_timings,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
threading,
|
||||
) {
|
||||
Ok((problems, total_time)) => {
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ impl<'a> State<'a> {
|
|||
number_of_workers: usize,
|
||||
exec_mode: ExecutionMode,
|
||||
) -> Self {
|
||||
let cache_dir = roc_packaging::cache::roc_cache_dir();
|
||||
let cache_dir = roc_packaging::cache::roc_cache_packages_dir();
|
||||
let dependencies = Dependencies::new(exec_mode.goal_phase());
|
||||
|
||||
Self {
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ pub fn load_module_for_docs(filename: PathBuf) -> LoadedModule {
|
|||
&arena,
|
||||
filename,
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
load_config,
|
||||
) {
|
||||
Ok(loaded) => loaded,
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ pub fn generate(
|
|||
linking_strategy,
|
||||
true,
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
load_config,
|
||||
Some(dylib_dir.path()),
|
||||
),
|
||||
|
|
@ -414,7 +414,7 @@ pub fn load_types(
|
|||
arena,
|
||||
full_file_path,
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
LoadConfig {
|
||||
target,
|
||||
function_kind,
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ pub(crate) fn global_analysis(doc_info: DocInfo) -> Vec<AnalyzedDocument> {
|
|||
roc_target::Target::LinuxX64,
|
||||
roc_load::FunctionKind::LambdaSet,
|
||||
roc_reporting::report::RenderTarget::LanguageServer,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
roc_reporting::report::DEFAULT_PALETTE,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ pub(crate) mod diag {
|
|||
LoadingProblem::CouldNotFindCacheDir => {
|
||||
format!(
|
||||
"Could not find Roc cache directory {}",
|
||||
roc_packaging::cache::roc_cache_dir().display()
|
||||
roc_packaging::cache::roc_cache_packages_dir().display()
|
||||
)
|
||||
}
|
||||
LoadingProblem::UnrecognizedPackageShorthand { shorthand, .. } => {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ pub fn compile_to_mono<'a, 'i, I: Iterator<Item = &'i str>>(
|
|||
module_src,
|
||||
src_dir,
|
||||
None,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
RocCacheDir::Persistent(cache::roc_cache_packages_dir().as_path()),
|
||||
LoadConfig {
|
||||
target,
|
||||
function_kind: FunctionKind::LambdaSet,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue