Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,60 @@ so this also tests that it won't be a problem.


Next we go into our Dune project and build it.
$ dune build --root A
$ dune build --trace-file trace.json --root A
Entering directory 'A'
Inductive hello : Set :=
I : hello | am : hello | an : hello | install : hello | loc : hello.
Leaving directory 'A'

Now we check the flags that were passed to coqdep and coqc:

$ tail -4 A/_build/log | head -2 | ../scrub_coq_args.sh
rocq dep
-boot
-R coq/theories Corelib
-Q $TESTCASE_ROOT/lib/coq/user-contrib/B B
-R . A -dyndep opt -vos a.v >
_build/default/.A.theory.d
rocq compile -q
-w -deprecated-native-compiler-option -native-output-dir .
-native-compiler on
-nI lib/rocq-runtime/kernel
-nI .
-boot
-R coq/theories Corelib
-Q $TESTCASE_ROOT/lib/coq/user-contrib/B B
-R . A
a.v
$ jq '.[] | select(.cat == "process" and (.args.process_args.[0] | IN ("compile", "dep"))) | {name, args: (.args.process_args | map(sub(".*/coq-core"; "coq-core")))}' trace.json
{
"name": "rocq",
"args": [
"dep",
"-boot",
"-R",
"$TESTCASE_ROOT/lib/coq/theories",
"Corelib",
"-Q",
"$TESTCASE_ROOT/lib/coq/user-contrib/B",
"B",
"-R",
".",
"A",
"-dyndep",
"opt",
"-vos",
"a.v"
]
}
{
"name": "rocq",
"args": [
"compile",
"-q",
"-w",
"-deprecated-native-compiler-option",
"-native-output-dir",
".",
"-native-compiler",
"on",
"-nI",
"/home/runner/work/dune/dune/_opam/lib/rocq-runtime/kernel",
"-nI",
".",
"-boot",
"-R",
"$TESTCASE_ROOT/lib/coq/theories",
"Corelib",
"-Q",
"$TESTCASE_ROOT/lib/coq/user-contrib/B",
"B",
"-R",
".",
"A",
"a.v"
]
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
Testing that the correct flags are being passed to dune rocq top

The flags passed to coqc:
$ dune build && tail -1 _build/log | ../../scrub_coq_args.sh
rocq compile
-w -notation-overridden
-w -deprecated-native-compiler-option -native-output-dir .
-native-compiler on
-nI lib/rocq-runtime/kernel
-nI .
-boot
-R coq/theories Corelib
-R . minimal
Test.v
$ dune build --trace-file trace.json
$ jq '.[] | select(.cat == "process" and (.args.process_args.[0] == "compile")) | .args.process_args | .[] | sub(".*/coq/theories"; "coq/theories") | sub(".*/rocq-runtime/"; "rocq-runtime/")' trace.json
"compile"
"-w"
"-notation-overridden"
"-w"
"-deprecated-native-compiler-option"
"-native-output-dir"
"."
"-native-compiler"
"on"
"-nI"
"rocq-runtime/kernel"
"-nI"
"."
"-boot"
"-R"
"coq/theories"
"Corelib"
"-R"
"."
"minimal"
"Test.v"

The flags passed to coqtop:
$ dune rocq top --toplevel=echo Test.v | ../../scrub_coq_args.sh
Expand Down
Loading
Loading