Skip to content

Commit

Permalink
fix: don't take build lock for coq top --no-build (#10547)
Browse files Browse the repository at this point in the history
Signed-off-by: Zongyuan Liu <liuzongyuan0505@gmail.com>
  • Loading branch information
lzy0505 committed May 29, 2024
1 parent 7af2a84 commit 86b8a6d
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 86b8a6d

Please sign in to comment.