Skip to content

Commit

Permalink
Update to Eio 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
SGrondin committed Sep 9, 2023
1 parent 7a4e710 commit 6fb4792
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/cli/strings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type traversal = {

type job = {
file_type: file_type;
eio_path: Eio.Fs.dir Eio.Path.t;
eio_path: [< Eio.Fs.dir_ty ] Eio.Path.t;
path: string;
template_script: Vue.template_script;
slow_pug: bool;
Expand Down Expand Up @@ -108,7 +108,7 @@ let rec traverse ~fs ~stderr ({ slow_pug; template_script; counts; wp; _ } as tr
| None -> ()
| Some file_type ->
let job = { file_type; eio_path = Eio.Path.(fs / path); path; template_script; slow_pug } in
let collector = Eio.Workpool.run_exn traversal.wp (fun () -> process_job job) in
let collector = Eio.Workpool.submit_exn traversal.wp (fun () -> process_job job) in
let count =
match job.file_type with
| JS -> counts.js
Expand Down
2 changes: 1 addition & 1 deletion src/parsing/basic.mli
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ val exec_parser_eio :
'a Angstrom.t ->
path:string ->
language_name:string ->
#Eio.Flow.source ->
_ Eio.Flow.source ->
'b
2 changes: 1 addition & 1 deletion src/utils/io.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let traversal_jobs_per_core = 4

let num_systhreads = 2

let stat wp path : Core_unix.stats = Eio.Workpool.run_exn wp (fun () -> Core_unix.stat path)
let stat wp path : Core_unix.stats = Eio.Workpool.submit_exn wp (fun () -> Core_unix.stat path)

let load_flow flow =
let open Eio in
Expand Down
17 changes: 9 additions & 8 deletions strings.opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ homepage: "https://github.com/okTurtles/strings"
doc: "https://github.com/okTurtles/strings"
bug-reports: "https://github.com/okTurtles/strings/issues"
pin-depends: [
[ "angstrom-eio.0.15.0.custom" "git+https://github.com/SGrondin/angstrom.git#137d5ba2bb55f99b5278c11ab0c967669f2b998a" ]
[ "angstrom.0.15.0.custom" "git+https://github.com/SGrondin/angstrom.git#137d5ba2bb55f99b5278c11ab0c967669f2b998a" ]
[ "eio.0.11.custom" "git+https://github.com/SGrondin/eio.git#full-workpool" ]
[ "eio_posix.0.11.custom" "git+https://github.com/SGrondin/eio.git#full-workpool" ]
[ "eio_linux.0.11.custom" "git+https://github.com/SGrondin/eio.git#full-workpool" ]
[ "eio_main.0.11.custom" "git+https://github.com/SGrondin/eio.git#full-workpool" ]
[ "angstrom-eio.0.15.0.custom" "git+https://github.com/SGrondin/angstrom.git#1a961940ffb746379b4bdc648bc194501b65348a" ]
[ "angstrom.0.15.0.custom" "git+https://github.com/SGrondin/angstrom.git#1a961940ffb746379b4bdc648bc194501b65348a" ]
[ "eio.0.12.custom" "git+https://github.com/SGrondin/eio.git#37e0dc0d98bd6c18506a974c3ce2b81e89be30a9" ]
[ "eio_posix.0.12.custom" "git+https://github.com/SGrondin/eio.git#37e0dc0d98bd6c18506a974c3ce2b81e89be30a9" ]
[ "eio_linux.0.12.custom" "git+https://github.com/SGrondin/eio.git#37e0dc0d98bd6c18506a974c3ce2b81e89be30a9" ]
[ "eio_main.0.12.custom" "git+https://github.com/SGrondin/eio.git#37e0dc0d98bd6c18506a974c3ce2b81e89be30a9" ]
[ "SZXX.4.0.1.custom" "git+https://github.com/asemio/SZXX.git#4.0.1" ]
]
depends: [
"ocaml" { = "5.0.0" }
Expand All @@ -28,7 +29,7 @@ depends: [
"ocamlformat" { = "0.25.1" & with-test }
"ocaml-lsp-server" { with-test }

"eio_main" { = "0.11.custom" }
"eio_main" { = "0.12.custom" }

"angstrom" { = "0.15.0.custom" }
"angstrom-eio" { = "0.15.0.custom" }
Expand All @@ -42,5 +43,5 @@ depends: [
"yojson"
"uuidm"
"wtf8"
"SZXX" { >= "4.0.0" }
"SZXX" { = "4.0.1.custom" }
]

0 comments on commit 6fb4792

Please sign in to comment.