File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -326,11 +326,13 @@ module Compile = struct
326
326
Buffer. reset warning_buffer;
327
327
str
328
328
329
- let super_warning_printer loc ppf w =
329
+ (* We need to overload the original warning printer to capture the warnings
330
+ as an array *)
331
+ let playground_warning_printer loc ppf w =
330
332
match Warnings. report w with
331
333
| `Inactive -> ()
332
334
| `Active { Warnings. number; is_error; } ->
333
- ! Location. warning_printer loc ppf w;
335
+ Location. default_warning_printer loc ppf w;
334
336
let open LocWarnInfo in
335
337
let fullMsg = flush_warning_buffer () in
336
338
let shortMsg = Warnings. message w in
@@ -345,7 +347,7 @@ module Compile = struct
345
347
346
348
let () =
347
349
Location. formatter_for_warnings := warning_ppf;
348
- Location. warning_printer := super_warning_printer
350
+ Location. warning_printer := playground_warning_printer
349
351
350
352
let handle_err e =
351
353
(match error_of_exn e with
You can’t perform that action at this time.
0 commit comments