Split utils into error and command utils

Error utils pulls in snafu which requires procedural macros.
This means it can't start compiling until syn and macro related crates are compiled.
This deals compiling all crates that depend on commands like running zig for the bitcode.
The split enables those crates to run sooner.
This commit is contained in:
Brendan Hansknecht 2023-03-10 09:32:21 -08:00
parent d5e191d083
commit cb191d3788
No known key found for this signature in database
GPG key ID: A199D0660F95F948
30 changed files with 186 additions and 333 deletions

View file

@ -12,8 +12,8 @@ name = "test_gen"
path = "src/tests.rs"
[build-dependencies]
roc_builtins = { path = "../builtins" }
roc_utils = { path = "../../utils" }
roc_bitcode = { path = "../builtins/bitcode" }
roc_command_utils = { path = "../../utils/command" }
wasi_libc_sys = { path = "../../wasi-libc-sys" }
tempfile.workspace = true
@ -24,6 +24,7 @@ roc_build = { path = "../build", features = ["target-aarch64", "target-x86_64",
roc_builtins = { path = "../builtins" }
roc_can = { path = "../can" }
roc_collections = { path = "../collections" }
roc_command_utils = { path = "../../utils/command" }
roc_constrain = { path = "../constrain" }
roc_debug_flags = { path = "../debug_flags" }
roc_error_macros = { path = "../../error_macros" }
@ -43,7 +44,6 @@ roc_std = { path = "../../roc_std" }
roc_target = { path = "../roc_target" }
roc_types = { path = "../types" }
roc_unify = { path = "../unify" }
roc_utils = { path = "../../utils" }
roc_wasm_interp = { path = "../../wasm_interp" }
roc_wasm_module = { path = "../../wasm_module" }

View file

@ -1,5 +1,4 @@
use roc_builtins::bitcode;
use roc_utils::zig;
use roc_command_utils::zig;
use std::env;
use std::fs;
use std::path::Path;

View file

@ -5,6 +5,7 @@ use inkwell::module::Module;
use libloading::Library;
use roc_build::link::llvm_module_to_dylib;
use roc_collections::all::MutSet;
use roc_command_utils::zig;
use roc_gen_llvm::llvm::externs::add_default_roc_externs;
use roc_gen_llvm::{llvm::build::LlvmBackendMode, run_roc::RocCallResult};
use roc_load::{EntryPoint, ExecutionMode, LoadConfig, LoadMonomorphizedError, Threading};
@ -12,7 +13,6 @@ use roc_mono::ir::{CrashTag, OptLevel, SingleEntryPoint};
use roc_packaging::cache::RocCacheDir;
use roc_region::all::LineInfo;
use roc_reporting::report::{RenderTarget, DEFAULT_PALETTE};
use roc_utils::zig;
use target_lexicon::Triple;
#[cfg(feature = "gen-llvm-wasm")]