Skip to content

Commit

Permalink
Relax lower bound dependency for OCaml
Browse files Browse the repository at this point in the history
  • Loading branch information
lthms committed Jan 13, 2024
1 parent 679d416 commit b6c1e45
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions bin/spatialblock/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ let entry_jsoner =
let config_jsoner = Ezjsonm_encoding.Decoding.list entry_jsoner

let load_config () =
let read_file path = In_channel.(with_open_text path input_all) in
let ( // ) = Filename.concat in
let config_dir =
match Sys.getenv_opt "XDG_CONFIG_HOME" with
Expand All @@ -28,8 +27,8 @@ let load_config () =
let config_path = config_dir // "spatial" // "spatialblock.json" in
if Sys.file_exists config_path then
let conf =
read_file config_path
|> Ezjsonm_encoding.Decoding.of_string_exn config_jsoner
open_in config_path |> Ezjsonm.from_channel
|> Ezjsonm_encoding.Decoding.from_value_exn config_jsoner
in
List.iter (fun (entry, icon) -> App_id_map.add app_id_map entry icon) conf
else ()
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
(name spatial-shell)
(synopsis
"Implementing a spatial model inspired by Material Shell, for i3 and Sway")
(depends (ocaml (>= "4.12")) poll (clap (>= "0.3.0")) ezjsonm-encoding conf-scdoc))
(depends (ocaml (>= "4.08")) poll (clap (>= "0.3.0")) (ezjsonm-encoding (>= "2.0.0")) conf-scdoc))

(package
(allow_empty)
Expand Down
2 changes: 1 addition & 1 deletion lib/sway_ipc/sway_ipc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let send_command : type a. ?socket:socket -> a Message.t -> a =
Socket.write_raw_message ~magic_string socket raw;
let op', payload = Socket.read_raw_message ~magic_string socket in
assert (op = op');
Ezjsonm_encoding.Decoding.of_string_exn (Message.reply_decoder cmd) payload
Ezjsonm_encoding.Decoding.from_string_exn (Message.reply_decoder cmd) payload

let subscribe events =
let socket = connect () in
Expand Down
2 changes: 1 addition & 1 deletion lib/sway_ipc_types/event.ml
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ let decoder (code : event_type) =

let event_of_raw_message (opc, payload) =
let ev = event_type_of_code opc in
Ezjsonm_encoding.Decoding.of_string_exn (decoder ev) payload
Ezjsonm_encoding.Decoding.from_string_exn (decoder ev) payload
4 changes: 2 additions & 2 deletions spatial-shell.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ homepage: "https://github.com/lthms/spatial-shell"
bug-reports: "https://github.com/lthms/spatial-shell/issues"
depends: [
"dune" {>= "3.0"}
"ocaml" {>= "4.12"}
"ocaml" {>= "4.08"}
"poll"
"clap" {>= "0.3.0"}
"ezjsonm-encoding"
"ezjsonm-encoding" {>= "2.0.0"}
"conf-scdoc"
"odoc" {with-doc}
]
Expand Down

0 comments on commit b6c1e45

Please sign in to comment.