Skip to content

Commit 3a69990

Browse files
authored
Fix deprecation warnings in bsb (#5875)
1 parent 5f8c42d commit 3a69990

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

jscomp/bsb/bsb_log.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ let get_color_enabled () =
3737
in
3838
colorful
3939

40-
let color_functions : Format.formatter_tag_functions =
40+
let color_functions : Format.formatter_stag_functions =
4141
{
42-
mark_open_tag =
42+
mark_open_stag =
4343
(fun s ->
4444
if get_color_enabled () then Ext_color.ansi_of_tag s
4545
else Ext_string.empty);
46-
mark_close_tag =
46+
mark_close_stag =
4747
(fun _ ->
4848
if get_color_enabled () then Ext_color.reset_lit else Ext_string.empty);
49-
print_open_tag = (fun _ -> ());
50-
print_close_tag = (fun _ -> ());
49+
print_open_stag = (fun _ -> ());
50+
print_close_stag = (fun _ -> ());
5151
}
5252

5353
(* let set_color ppf =
@@ -56,8 +56,8 @@ let color_functions : Format.formatter_tag_functions =
5656
let setup () =
5757
Format.pp_set_mark_tags Format.std_formatter true;
5858
Format.pp_set_mark_tags Format.err_formatter true;
59-
Format.pp_set_formatter_tag_functions Format.std_formatter color_functions;
60-
Format.pp_set_formatter_tag_functions Format.err_formatter color_functions
59+
Format.pp_set_formatter_stag_functions Format.std_formatter color_functions;
60+
Format.pp_set_formatter_stag_functions Format.err_formatter color_functions
6161

6262
type level = Debug | Info | Warn | Error
6363

jscomp/bsb/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
(name bsb)
33
(wrapped false)
44
(flags
5-
(:standard -w +a-d-4-9-40-41-42-70))
5+
(:standard -w +a-4-9-40-41-42-70))
66
(libraries common ext str unix))

jscomp/bsb_exe/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
(name rescript_main)
33
(public_name rescript)
44
(flags
5-
(:standard -w +a-d-4-9-40-41-42-70))
5+
(:standard -w +a-4-9-40-41-42-70))
66
(libraries bsb common ext str unix))

jscomp/ext/ext_color.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ let code_of_style = function
5959
(** TODO: add more styles later *)
6060
let style_of_tag s =
6161
match s with
62-
| "error" -> [ Bold; FG Red ]
63-
| "warning" -> [ Bold; FG Magenta ]
64-
| "info" -> [ Bold; FG Yellow ]
65-
| "dim" -> [ Dim ]
66-
| "filename" -> [ FG Cyan ]
62+
| Format.String_tag "error" -> [ Bold; FG Red ]
63+
| Format.String_tag "warning" -> [ Bold; FG Magenta ]
64+
| Format.String_tag "info" -> [ Bold; FG Yellow ]
65+
| Format.String_tag "dim" -> [ Dim ]
66+
| Format.String_tag "filename" -> [ FG Cyan ]
6767
| _ -> []
6868

6969
let ansi_of_tag s =

jscomp/ext/ext_color.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White
2626

2727
type style = FG of color | BG of color | Bold | Dim
2828

29-
val ansi_of_tag : string -> string
29+
val ansi_of_tag : Format.stag -> string
3030
(** Input is the tag for example `@{<warning>@}` return escape code *)
3131

3232
val reset_lit : string

0 commit comments

Comments
 (0)