@@ -1014,7 +1014,7 @@ pub fn compile_file(
1014
1014
// ^^ this one fails for bisect-ppx
1015
1015
// this is the default
1016
1016
// we should probably parse the right ones from the package config
1017
- vec![ "-w" . to_string( ) , "a" . to_string( ) ] ,
1017
+ // vec!["-w".to_string(), "a".to_string()],
1018
1018
implementation_args,
1019
1019
// vec![
1020
1020
// "-I".to_string(),
@@ -1047,6 +1047,10 @@ pub fn compile_file(
1047
1047
}
1048
1048
Err ( e) => Err ( format ! ( "ERROR, {}, {:?}" , e, ast_path) ) ,
1049
1049
Ok ( x) => {
1050
+ let err = std:: str:: from_utf8 ( & x. stderr )
1051
+ . expect ( "stdout should be non-null" )
1052
+ . to_string ( ) ;
1053
+
1050
1054
let dir = std:: path:: Path :: new ( implementation_file_path)
1051
1055
. strip_prefix ( get_package_path ( root_path, & module. package . name ) )
1052
1056
. unwrap ( )
@@ -1082,9 +1086,8 @@ pub fn compile_file(
1082
1086
) ;
1083
1087
}
1084
1088
1085
- let stderr = std:: str:: from_utf8 ( & x. stderr ) . expect ( "stderr should be non-null" ) ;
1086
- if helpers:: contains_ascii_characters ( stderr) {
1087
- Ok ( Some ( stderr. to_string ( ) ) )
1089
+ if helpers:: contains_ascii_characters ( & err) {
1090
+ Ok ( Some ( err) )
1088
1091
} else {
1089
1092
Ok ( None )
1090
1093
}
@@ -1466,9 +1469,6 @@ pub fn build(path: &str) -> Result<AHashMap<std::string::String, Module>, ()> {
1466
1469
1467
1470
pb. finish ( ) ;
1468
1471
cleanup_after_build ( & modules, & compiled_modules, & all_modules, & project_root) ;
1469
- if helpers:: contains_ascii_characters ( & compile_warnings) {
1470
- println ! ( "{}" , & compile_warnings) ;
1471
- }
1472
1472
if compile_errors. len ( ) > 0 {
1473
1473
println ! (
1474
1474
"{}\r {} {}Compiled in {:.2}s" ,
@@ -1477,6 +1477,9 @@ pub fn build(path: &str) -> Result<AHashMap<std::string::String, Module>, ()> {
1477
1477
CROSS ,
1478
1478
compile_duration. as_secs_f64( )
1479
1479
) ;
1480
+ if helpers:: contains_ascii_characters ( & compile_warnings) {
1481
+ println ! ( "{}" , & compile_warnings) ;
1482
+ }
1480
1483
println ! ( "{}" , & compile_errors) ;
1481
1484
return Err ( ( ) ) ;
1482
1485
} else {
@@ -1487,6 +1490,9 @@ pub fn build(path: &str) -> Result<AHashMap<std::string::String, Module>, ()> {
1487
1490
CHECKMARK ,
1488
1491
compile_duration. as_secs_f64( )
1489
1492
) ;
1493
+ if helpers:: contains_ascii_characters ( & compile_warnings) {
1494
+ println ! ( "{}" , & compile_warnings) ;
1495
+ }
1490
1496
}
1491
1497
1492
1498
let timing_total_elapsed = timing_total. elapsed ( ) ;
0 commit comments