File tree 5 files changed +26
-8
lines changed
test/blackbox-tests/test-cases/coq/coqtop
5 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ Unreleased
65
65
- Remove "Entering Directory" messages for ` $ dune install ` . (#6513 ,
66
66
@rgrinberg )
67
67
68
+ - Stop passing ` -q ` flag in ` dune coq top ` , which allows for ` .coqrc ` to be
69
+ loaded. (#6848 , fixes #6847 , @Alizter )
70
+
68
71
- Fix missing dependencies when detecting the kind of C compiler we're using
69
72
(#6610 , fixes #6415 , @emillon )
70
73
Original file line number Diff line number Diff line change @@ -347,7 +347,22 @@ let generic_coq_args ~sctx ~dir ~wrapper_name ~boot_type ~mode ~coq_prog
347
347
~stanza_flags ~ml_flags ~theories_deps ~theory_dirs coq_module =
348
348
let + coq_stanza_flags =
349
349
let + expander = Super_context. expander sctx ~dir in
350
- let coq_flags = coq_flags ~expander ~dir ~stanza_flags ~sctx in
350
+ let coq_flags =
351
+ let coq_flags = coq_flags ~expander ~dir ~stanza_flags ~sctx in
352
+ (* By default we have the -q flag. We don't want to pass this to coqtop to
353
+ allow users to load their .coqrc files for interactive development.
354
+ Therefore we manually scrub the -q setting when passing arguments to
355
+ coqtop. *)
356
+ match coq_prog with
357
+ | `Coqtop ->
358
+ let rec remove_q = function
359
+ | "-q" :: l -> remove_q l
360
+ | _ :: l -> remove_q l
361
+ in
362
+ let open Action_builder.O in
363
+ coq_flags >> | remove_q
364
+ | _ -> coq_flags
365
+ in
351
366
Command.Args. dyn coq_flags (* stanza flags *)
352
367
in
353
368
let coq_native_flags =
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ Checking that we compute the directory and file for dune coq top correctly
3
3
$ dune build theories/ c. vo
4
4
$ dune build theories/ b/ b. vo
5
5
$ dune coq top -- toplevel= echo theories/ c. v
6
- -topfile $ TESTCASE_ROOT / _build/ default / theories/ c. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / theories foo
6
+ -topfile $ TESTCASE_ROOT / _build/ default / theories/ c. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / theories foo
7
7
$ dune coq top -- toplevel= echo theories/ b/ b. v
8
- -topfile $ TESTCASE_ROOT / _build/ default / theories/ b/ b. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / theories foo
8
+ -topfile $ TESTCASE_ROOT / _build/ default / theories/ b/ b. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / theories foo
Original file line number Diff line number Diff line change @@ -22,19 +22,19 @@ https://github.com/ocaml/dune/pull/5457#issuecomment-1084161587).
22
22
coqdep dir/ bar. v. d
23
23
coqdep dir/ foo. v. d
24
24
coqc dir/ foo. {glob,vo}
25
- -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
25
+ -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
26
26
$ dune coq top -- display short -- toplevel echo dir/ bar. v
27
- -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
27
+ -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
28
28
$ dune clean
29
29
$ (cd dir && dune coq top -- root .. -- display short -- toplevel echo dir/ bar. v)
30
30
Entering directory ' ..'
31
31
coqdep dir/ bar. v. d
32
32
coqdep dir/ foo. v. d
33
33
coqc dir/ foo. {glob,vo}
34
34
Leaving directory ' ..'
35
- -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
35
+ -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
36
36
$ (cd dir && dune coq top -- root .. -- display short -- toplevel echo dir/ bar. v)
37
37
Entering directory ' ..'
38
38
Leaving directory ' ..'
39
- -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
39
+ -topfile $ TESTCASE_ROOT / _build/ default / dir/ bar. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / dir basic
40
40
Original file line number Diff line number Diff line change 1
1
All dune commands work when you run them in sub-directories, so this should be no exception.
2
2
3
3
$ dune coq top -- toplevel= echo -- theories/ foo. v
4
- -topfile $ TESTCASE_ROOT / _build/ default / theories/ foo. v -q - w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / theories foo
4
+ -topfile $ TESTCASE_ROOT / _build/ default / theories/ foo. v -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler ondemand -R $ TESTCASE_ROOT / _build/ default / theories foo
5
5
$ cd theories
6
6
7
7
This test is currently broken due to the workspace resolution being faulty # 5899.
You can’t perform that action at this time.
0 commit comments