this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Driver: Log warnings from the compile step

+12 -8
+1 -1
src/driver/bin/odoc_driver.ml
··· 130 130 List.iter 131 131 (fun { Cmd_outputs.log_dest; prefix; run } -> 132 132 match log_dest with 133 - | `Link -> 133 + | `Link | `Compile -> 134 134 [ run.Run.output; run.Run.errors ] 135 135 |> List.iter @@ fun content -> 136 136 if String.length content = 0 then ()
+4 -2
src/driver/compile.ml
··· 138 138 (Odoc_unit.Pkg_args.compiled_libs unit.pkg_args) 139 139 in 140 140 Odoc.compile ~output_dir:unit.output_dir ~input_file:unit.input_file 141 - ~includes ~warnings_tag:unit.pkgname ~parent_id:unit.parent_id; 141 + ~includes ~warnings_tag:unit.pkgname ~parent_id:unit.parent_id 142 + ~ignore_output:(not unit.enable_warnings); 142 143 (match unit.input_copy with 143 144 | None -> () 144 145 | Some p -> Util.cp (Fpath.to_string unit.input_file) (Fpath.to_string p)); ··· 196 197 | `Mld -> 197 198 let includes = Fpath.Set.empty in 198 199 Odoc.compile ~output_dir:unit.output_dir ~input_file:unit.input_file 199 - ~includes ~warnings_tag:None ~parent_id:unit.parent_id; 200 + ~includes ~warnings_tag:None ~parent_id:unit.parent_id 201 + ~ignore_output:(not unit.enable_warnings); 200 202 Atomic.incr Stats.stats.compiled_mlds; 201 203 Ok [ unit ] 202 204 | `Md ->
+6 -5
src/driver/odoc.ml
··· 36 36 | [ (_, digest) ], deps -> Ok { digest; deps } 37 37 | _ -> Error (`Msg "odd") 38 38 39 - let compile ~output_dir ~input_file:file ~includes ~warnings_tag ~parent_id = 39 + let compile ~output_dir ~input_file:file ~includes ~warnings_tag ~parent_id 40 + ~ignore_output = 40 41 let open Cmd in 41 42 let includes = 42 43 Fpath.Set.fold ··· 59 60 | Some tag -> cmd % "--warnings-tag" % tag 60 61 in 61 62 let desc = Printf.sprintf "Compiling %s" (Fpath.to_string file) in 62 - ignore 63 - @@ Cmd_outputs.submit 64 - (Some (`Compile, Fpath.to_string file)) 65 - desc cmd output_file 63 + let log = 64 + if ignore_output then None else Some (`Compile, Fpath.to_string file) 65 + in 66 + ignore @@ Cmd_outputs.submit log desc cmd output_file 66 67 67 68 let compile_md ~output_dir ~input_file:file ~parent_id = 68 69 let open Cmd in
+1
src/driver/odoc.mli
··· 27 27 includes:Fpath.set -> 28 28 warnings_tag:string option -> 29 29 parent_id:Id.t -> 30 + ignore_output:bool -> 30 31 unit 31 32 val compile_md : 32 33 output_dir:Fpath.t -> input_file:Fpath.t -> parent_id:Id.t -> unit