Skip to content

Commit

Permalink
Vendor progress lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Gbury committed Dec 25, 2022
1 parent 5ead30e commit 03e01c5
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/progress"]
path = vendor/progress
url = https://github.com/Gbury/progress.git
11 changes: 5 additions & 6 deletions dolmen_bin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ depends: [
"dolmen_type" {= version }
"dolmen_loop" {= version }
"dolmen_model" {= version }
"odoc" { with-doc }
"dune" { >= "3.0" }
"fmt"
"cmdliner" { >= "1.1.0" }
"odoc" { with-doc }
"progress"
"terminal"
]
pin-depends: [
[ "progress" "git+https://github.com/Gbury/progress.git#custom" ]
"pp_loc" { >= "2.0.0" }
# These two are currently vendored
# "progress"
# "terminal"
]
depopts: [
"memtrace"
Expand Down
1 change: 0 additions & 1 deletion dolmen_loop.opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ depends: [
"dune" { >= "3.0" }
"gen"
"odoc" { with-doc }
"pp_loc" { >= "2.0.0" }
]
tags: [ "logic" "computation" "automated theorem prover" ]
homepage: "https://github.com/Gbury/dolmen"
Expand Down
3 changes: 3 additions & 0 deletions dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
; directory for vendored libs
(vendored_dirs vendor)

(env
; Ensure no inlinging takes place in dev mode to have more accurate backtraces
(dev (ocamlopt_flags :standard -inline 0))
Expand Down
2 changes: 2 additions & 0 deletions src/bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
(libraries
; external deps
cmdliner fmt gen
pp_loc progress terminal
mtime mtime.clock.os
; dolmen deps
dolmen dolmen.intf dolmen.std
dolmen_type dolmen_loop dolmen_model
Expand Down
7 changes: 4 additions & 3 deletions src/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ let finally st e =
| None -> st
| Some (bt,exn) ->
(* Print the backtrace if requested *)
if State.(get bt) st then (
(* TODO: use Tui *)
Printexc.print_raw_backtrace stdout bt);
if State.(get bt) st then begin
Tui.eprintf "%s@."
(Printexc.raw_backtrace_to_string bt)
end;
handle_exn st exn

let run st =
Expand Down
2 changes: 1 addition & 1 deletion src/loop/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(instrumentation (backend bisect_ppx))
(libraries
; External deps
gen unix fmt pp_loc terminal progress
gen unix fmt
; main dolmen deps, with versioned languages deps
dolmen
dolmen.intf dolmen.std dolmen.class
Expand Down
1 change: 1 addition & 0 deletions vendor/progress
Submodule progress added at 019cc6

0 comments on commit 03e01c5

Please sign in to comment.