mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
Merge branch 'main' into module-params
This commit is contained in:
commit
eb68bf943a
159 changed files with 5937 additions and 22739 deletions
|
|
@ -29,11 +29,8 @@ roc_reporting = { path = "../../reporting" }
|
|||
roc_solve = { path = "../solve" }
|
||||
roc_target = { path = "../roc_target" }
|
||||
roc_error_macros = { path = "../../error_macros" }
|
||||
|
||||
bumpalo.workspace = true
|
||||
|
||||
[target.'cfg(not(windows))'.build-dependencies]
|
||||
roc_load_internal = { path = "../load_internal" }
|
||||
bumpalo.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
roc_constrain = { path = "../constrain" }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[cfg(not(windows))]
|
||||
use bumpalo::Bump;
|
||||
use roc_error_macros::internal_error;
|
||||
use roc_module::symbol::ModuleId;
|
||||
|
|
@ -47,19 +46,11 @@ fn write_subs_for_module(module_id: ModuleId, filename: &str) {
|
|||
output_path.extend([filename]);
|
||||
output_path.set_extension("dat");
|
||||
|
||||
#[cfg(not(windows))]
|
||||
if SKIP_SUBS_CACHE {
|
||||
write_types_for_module_dummy(&output_path)
|
||||
} else {
|
||||
write_types_for_module_real(module_id, filename, &output_path)
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let _ = SKIP_SUBS_CACHE;
|
||||
let _ = module_id;
|
||||
write_types_for_module_dummy(&output_path)
|
||||
}
|
||||
}
|
||||
|
||||
fn write_types_for_module_dummy(output_path: &Path) {
|
||||
|
|
@ -67,7 +58,6 @@ fn write_types_for_module_dummy(output_path: &Path) {
|
|||
std::fs::write(output_path, []).unwrap();
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn write_types_for_module_real(module_id: ModuleId, filename: &str, output_path: &Path) {
|
||||
use roc_can::module::TypeState;
|
||||
use roc_load_internal::file::{LoadingProblem, Threading};
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ fn read_cached_types() -> MutMap<ModuleId, TypeState> {
|
|||
|
||||
// Wasm seems to re-order definitions between build time and runtime, but only in release mode.
|
||||
// That is very strange, but we can solve it separately
|
||||
if !cfg!(target_family = "wasm") && !cfg!(windows) && !SKIP_SUBS_CACHE {
|
||||
if !cfg!(target_family = "wasm") && !SKIP_SUBS_CACHE {
|
||||
output.insert(ModuleId::BOOL, deserialize_help(mod_bool));
|
||||
|
||||
output.insert(ModuleId::RESULT, deserialize_help(mod_result));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue