Use logs.lwt instead of lwt_logs

The latter is deprecated and incompatible with OCaml 5.0.
This commit is contained in:
Etienne Millon 2022-07-05 16:47:56 +02:00
parent 2569162157
commit 6c55ea7996
4 changed files with 8 additions and 7 deletions

View File

@ -4,7 +4,7 @@
(wrapped false)
(flags :standard -safe-string)
(modes byte)
(libraries compiler-libs.toplevel findlib.top lambda-term threads zed)
(libraries compiler-libs.toplevel findlib.top lambda-term logs.lwt threads zed)
(preprocess
(action
(run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file}))))

View File

@ -53,7 +53,7 @@ let save_history () =
?max_entries:!UTop.history_file_max_entries fn)
(function
| Unix.Unix_error (error, func, arg) ->
Lwt_log.error_f "cannot save history to %S: %s: %s" fn func (Unix.error_message error)
Logs_lwt.err (fun m -> m "cannot save history to %S: %s: %s" fn func (Unix.error_message error))
| exn -> Lwt.fail exn)
let init_history () =
@ -68,8 +68,8 @@ let init_history () =
(fun () -> LTerm_history.load UTop.history fn)
(function
| Unix.Unix_error (error, func, arg) ->
Lwt_log.error_f "cannot load history from %S: %s: %s"
fn func (Unix.error_message error)
Logs_lwt.err (fun m -> m "cannot load history from %S: %s: %s"
fn func (Unix.error_message error))
| exn -> Lwt.fail exn)
(* +-----------------------------------------------------------------+
@ -1590,9 +1590,9 @@ let load_inputrc () =
LTerm_inputrc.load
(function
| Unix.Unix_error (error, func, arg) ->
Lwt_log.error_f "cannot load key bindings from %S: %s: %s" LTerm_inputrc.default func (Unix.error_message error)
Logs_lwt.err (fun m -> m "cannot load key bindings from %S: %s: %s" LTerm_inputrc.default func (Unix.error_message error))
| LTerm_inputrc.Parse_error (fname, line, msg) ->
Lwt_log.error_f "error in key bindings file %S, line %d: %s" fname line msg
Logs_lwt.err (fun m -> m "error in key bindings file %S, line %d: %s" fname line msg)
| exn -> Lwt.fail exn)
let protocol_version = 1

View File

@ -95,7 +95,7 @@ let load () =
| Unix.Unix_error(Unix.ENOENT, _, _) ->
return ()
| Unix.Unix_error (error, func, _arg) ->
Lwt_log.error_f "cannot load styles from %S: %s: %s" fn func (Unix.error_message error)
Logs_lwt.err (fun m -> m "cannot load styles from %S: %s: %s" fn func (Unix.error_message error))
| exn -> Lwt.fail exn)
let stylise_filter_layout stylise tokens =

View File

@ -11,6 +11,7 @@ depends: [
"base-threads"
"ocamlfind" {>= "1.7.2"}
"lambda-term" {>= "3.1.0" & < "4.0"}
"logs"
"lwt"
"lwt_react"
"zed" { >= "3.2.0" }