mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge remote-tracking branch 'origin/trunk' into pretty-expect-output
This commit is contained in:
commit
b9ebd4fa27
76 changed files with 2719 additions and 817 deletions
|
@ -39,7 +39,6 @@ pub struct BuiltFile {
|
|||
pub fn build_file<'a>(
|
||||
arena: &'a Bump,
|
||||
target: &Triple,
|
||||
src_dir: PathBuf,
|
||||
app_module_path: PathBuf,
|
||||
opt_level: OptLevel,
|
||||
emit_debug_info: bool,
|
||||
|
@ -59,7 +58,6 @@ pub fn build_file<'a>(
|
|||
let loaded = roc_load::load_and_monomorphize(
|
||||
arena,
|
||||
app_module_path.clone(),
|
||||
src_dir,
|
||||
subs_by_module,
|
||||
target_info,
|
||||
// TODO: expose this from CLI?
|
||||
|
@ -428,7 +426,6 @@ fn spawn_rebuild_thread(
|
|||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn check_file(
|
||||
arena: &Bump,
|
||||
src_dir: PathBuf,
|
||||
roc_file_path: PathBuf,
|
||||
emit_timings: bool,
|
||||
threading: Threading,
|
||||
|
@ -445,7 +442,6 @@ pub fn check_file(
|
|||
let mut loaded = roc_load::load_and_typecheck(
|
||||
arena,
|
||||
roc_file_path,
|
||||
src_dir,
|
||||
subs_by_module,
|
||||
target_info,
|
||||
// TODO: expose this from CLI?
|
||||
|
|
|
@ -359,8 +359,6 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
|
|||
);
|
||||
}
|
||||
|
||||
let src_dir = path.parent().unwrap().canonicalize().unwrap();
|
||||
|
||||
// let target_valgrind = matches.is_present(FLAG_VALGRIND);
|
||||
|
||||
let arena = &arena;
|
||||
|
@ -374,7 +372,6 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
|
|||
let loaded = roc_load::load_and_monomorphize(
|
||||
arena,
|
||||
path,
|
||||
src_dir,
|
||||
subs_by_module,
|
||||
target_info,
|
||||
// TODO: expose this from CLI?
|
||||
|
@ -536,12 +533,10 @@ pub fn build(
|
|||
}
|
||||
});
|
||||
|
||||
let src_dir = path.parent().unwrap().canonicalize().unwrap();
|
||||
let target_valgrind = matches.is_present(FLAG_VALGRIND);
|
||||
let res_binary_path = build_file(
|
||||
&arena,
|
||||
&triple,
|
||||
src_dir,
|
||||
path,
|
||||
opt_level,
|
||||
emit_debug_info,
|
||||
|
|
|
@ -90,8 +90,6 @@ fn main() -> io::Result<()> {
|
|||
let emit_timings = matches.is_present(FLAG_TIME);
|
||||
let filename = matches.value_of_os(ROC_FILE).unwrap();
|
||||
let roc_file_path = PathBuf::from(filename);
|
||||
let src_dir = roc_file_path.parent().unwrap().to_owned();
|
||||
|
||||
let threading = match matches
|
||||
.value_of(roc_cli::FLAG_MAX_THREADS)
|
||||
.and_then(|s| s.parse::<usize>().ok())
|
||||
|
@ -102,7 +100,7 @@ fn main() -> io::Result<()> {
|
|||
Some(n) => Threading::AtMost(n),
|
||||
};
|
||||
|
||||
match check_file(&arena, src_dir, roc_file_path, emit_timings, threading) {
|
||||
match check_file(&arena, roc_file_path, emit_timings, threading) {
|
||||
Ok((problems, total_time)) => {
|
||||
println!(
|
||||
"\x1B[{}m{}\x1B[39m {} and \x1B[{}m{}\x1B[39m {} found in {} ms.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue