Skip to content

Commit

Permalink
fix: don't take build lock for coq top --no-build
Browse files Browse the repository at this point in the history
Signed-off-by: Zongyuan Liu <[email protected]>
  • Loading branch information
lzy0505 committed May 28, 2024
1 parent 653e203 commit 5913d4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/coq/coqtop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let man =
let info = Cmd.info "top" ~doc ~man

let term =
let+ builder = Common.Builder.term
let+ default_builder = Common.Builder.term
and+ context =
let doc = "Run the Coq toplevel in this build context." in
Common.context_arg ~doc
Expand All @@ -34,7 +34,12 @@ let term =
& flag
& info [ "no-build" ] ~doc:"Don't rebuild dependencies before executing.")
in
let common, config = Common.init builder in
let common, config =
let builder =
if no_rebuild then Common.Builder.forbid_builds default_builder else default_builder
in
Common.init builder
in
let coq_file_arg = Common.prefix_target common coq_file_arg |> Path.Local.of_string in
let coqtop, argv, env =
Scheduler.go ~common ~config
Expand Down
2 changes: 2 additions & 0 deletions doc/changes/10547.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Don't try to take build lock when running `coq top --no-build` (#10547,
fixes #7671, @lzy0505)

0 comments on commit 5913d4d

Please sign in to comment.