Skip to content

Commit 5913d4d

Browse files
committed
fix: don't take build lock for coq top --no-build
Signed-off-by: Zongyuan Liu <liuzongyuan0505@gmail.com>
1 parent 653e203 commit 5913d4d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

bin/coq/coqtop.ml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let man =
1818
let info = Cmd.info "top" ~doc ~man
1919

2020
let term =
21-
let+ builder = Common.Builder.term
21+
let+ default_builder = Common.Builder.term
2222
and+ context =
2323
let doc = "Run the Coq toplevel in this build context." in
2424
Common.context_arg ~doc
@@ -34,7 +34,12 @@ let term =
3434
& flag
3535
& info [ "no-build" ] ~doc:"Don't rebuild dependencies before executing.")
3636
in
37-
let common, config = Common.init builder in
37+
let common, config =
38+
let builder =
39+
if no_rebuild then Common.Builder.forbid_builds default_builder else default_builder
40+
in
41+
Common.init builder
42+
in
3843
let coq_file_arg = Common.prefix_target common coq_file_arg |> Path.Local.of_string in
3944
let coqtop, argv, env =
4045
Scheduler.go ~common ~config

doc/changes/10547.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Don't try to take build lock when running `coq top --no-build` (#10547,
2+
fixes #7671, @lzy0505)

0 commit comments

Comments
 (0)