This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
From basic Require Import foo.
|
||||
|
||||
Definition false : t := t.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
(coq.theory
|
||||
(name basic)
|
||||
(package base)
|
||||
(modules :standard)
|
||||
(synopsis "Test Coq library"))
|
||||
|
||||
(rule
|
||||
(alias default)
|
||||
(action (echo "%{read:base.install}")))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 2.7)
|
||||
|
||||
(using coq 0.1)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 2.7)
|
||||
(env (unsound (coq (flags -type-in-type))))
|
||||
|
|
@ -0,0 +1 @@
|
|||
Definition t := Type.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
$ dune build --display short --profile unsound --debug-dependency-path @all
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
coqdep .basic.theory.d
|
||||
coqc foo.{glob,vo}
|
||||
coqc bar.{glob,vo}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
From basic Require Import foo.
|
||||
|
||||
Definition mynum (i : mynat) := 3.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
(coq.theory
|
||||
(name basic)
|
||||
(package base)
|
||||
(modules :standard)
|
||||
(synopsis "Test Coq library"))
|
||||
|
||||
(alias
|
||||
(name default)
|
||||
(action (echo "%{read:base.install}")))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 1.9)
|
||||
|
||||
(using coq 0.1)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Definition mynat := nat.
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
$ dune build --display short --debug-dependency-path @all --always-show-command-line
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
coqdep .basic.theory.d
|
||||
coqc foo.{glob,vo}
|
||||
coqc bar.{glob,vo}
|
||||
|
||||
$ dune build --debug-dependency-path @default
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
lib: [
|
||||
"_build/install/default/lib/base/META"
|
||||
"_build/install/default/lib/base/dune-package"
|
||||
"_build/install/default/lib/base/opam"
|
||||
]
|
||||
lib_root: [
|
||||
"_build/install/default/lib/coq/user-contrib/basic/bar.glob" {"coq/user-contrib/basic/bar.glob"}
|
||||
"_build/install/default/lib/coq/user-contrib/basic/bar.v" {"coq/user-contrib/basic/bar.v"}
|
||||
"_build/install/default/lib/coq/user-contrib/basic/bar.vo" {"coq/user-contrib/basic/bar.vo"}
|
||||
"_build/install/default/lib/coq/user-contrib/basic/foo.glob" {"coq/user-contrib/basic/foo.glob"}
|
||||
"_build/install/default/lib/coq/user-contrib/basic/foo.v" {"coq/user-contrib/basic/foo.v"}
|
||||
"_build/install/default/lib/coq/user-contrib/basic/foo.vo" {"coq/user-contrib/basic/foo.vo"}
|
||||
]
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive AnotherBeginning := Of | The | Universe.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(coq.theory
|
||||
(name A)
|
||||
(package A)
|
||||
(theories B)
|
||||
(boot))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 2.5)
|
||||
|
||||
(using coq 0.2)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive Beginning := Of | The | Universe.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(coq.theory
|
||||
(name B)
|
||||
(package B))
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 2.5)
|
||||
|
||||
(using coq 0.2)
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.2)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Testing composition with two boot libraries
|
||||
|
||||
$ dune build
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
File "A/dune", line 4, characters 11-12:
|
||||
4 | (theories B)
|
||||
^
|
||||
Error: (boot) libraries cannot have dependencies
|
||||
[1]
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive AnotherBeginning := Of | The | Universe.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name A)
|
||||
(package A)
|
||||
(boot))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 2.5)
|
||||
|
||||
(using coq 0.2)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive Beginning := Of | The | Universe.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name B)
|
||||
(package B)
|
||||
(boot))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 2.5)
|
||||
|
||||
(using coq 0.2)
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.2)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Testing composition with two boot libraries
|
||||
|
||||
$ dune build
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
Error: Cannot have more than one boot theory in scope:
|
||||
- A at A/dune:1
|
||||
- B at B/dune:1
|
||||
-> required by alias default
|
||||
[1]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Fail Print Prelude.
|
||||
From Coq Require Import Prelude.
|
||||
Print Prelude.
|
||||
Require Import mytheory.
|
||||
Check Hello.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name A)
|
||||
(stdlib no)
|
||||
(theories Coq))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.5)
|
||||
(using coq 0.6)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Print Prelude.
|
||||
Require Import mytheory.
|
||||
Check Hello.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name B)
|
||||
(stdlib yes)
|
||||
(theories Coq))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.5)
|
||||
(using coq 0.6)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Unset Elimination Schemes.
|
||||
Inductive BootType := boot | type.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
(coq.theory
|
||||
(name Coq)
|
||||
(package Coq)
|
||||
(boot))
|
||||
|
||||
(include_subdirs qualified)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.3)
|
||||
(using coq 0.4)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
Inductive Hello := World | Bye.
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.3)
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
Testing composition of theories across a Dune workspace with a boot library and
|
||||
importing ``stdlib`` enabled or disabled.
|
||||
|
||||
Composing library A depending on Coq but having `(stdlib no)`:
|
||||
|
||||
$ dune build A
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
Module
|
||||
Prelude
|
||||
:= Struct Inductive BootType : Set := boot : BootType | type : BootType. End
|
||||
|
||||
Hello
|
||||
: Set
|
||||
|
||||
Composing library B depending on Coq but having `(stdlib yes)`:
|
||||
|
||||
$ dune build B
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
Module
|
||||
Prelude
|
||||
:= Struct Inductive BootType : Set := boot : BootType | type : BootType. End
|
||||
|
||||
Hello
|
||||
: Set
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.4)
|
||||
|
||||
(using coq 0.5)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(library
|
||||
(name boot_plugin)
|
||||
(public_name coq-boot.boot_plugin))
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = Format.eprintf "plugin loaded@\n%!"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Declare ML Module "boot_plugin:coq-boot.boot_plugin".
|
||||
Inductive AnotherBeginning := Of | The | Universe.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
(coq.theory
|
||||
(name Coq)
|
||||
(boot)
|
||||
(package coq-boot)
|
||||
(plugins coq-boot.boot_plugin))
|
||||
|
||||
(include_subdirs qualified)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(coq.theory
|
||||
(name User)
|
||||
(package coq-user))
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.4)
|
||||
|
||||
(using coq 0.5)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Definition from_boot : AnotherBeginning := Universe.
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.4)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Testing composition with a boot library with plugins
|
||||
|
||||
$ dune build
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
plugin loaded
|
||||
plugin loaded
|
||||
|
|
@ -0,0 +1 @@
|
|||
Definition foo := 3.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name A)
|
||||
(theories B))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
From a Require Import a.
|
||||
|
||||
Definition bar := a.foo.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name B)
|
||||
(theories A))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.2)
|
||||
(using coq 0.3)
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
We check cycles are detected
|
||||
$ dune build
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
Error: Dependency cycle between:
|
||||
theory A in A/dune:2
|
||||
-> theory B in B/dune:2
|
||||
-> theory A in A/dune:2
|
||||
-> required by _build/default/A/.A.theory.d
|
||||
-> required by alias A/all
|
||||
-> required by alias default
|
||||
[1]
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
From B Require Import b.
|
||||
Print hello.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name A)
|
||||
(theories Coq B))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive hello := I | am | an | install | loc.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name B)
|
||||
(package B)
|
||||
(theories Coq))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.7)
|
||||
(package (name "B"))
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
We make sure that Coq lang versions < 0.8 can still somewhat compose with
|
||||
installed theories. The way this was done before was due to `-boot` not being
|
||||
passed to Coq. This meant that we essentially have `-Q "" user-contrib` being
|
||||
passed. In order to restore this behaviour for Coq lang < 0.8 we explicitly add
|
||||
that flag. This PR makes sure that this is indeed the case.
|
||||
|
||||
We configure COQLIB to be lib/coq. Coq will search for user-contrib from here.
|
||||
We also need to set up a fake Coq install.
|
||||
|
||||
$ mkdir -p lib/coq
|
||||
$ export COQLIB=$PWD/lib/coq
|
||||
$ echo $COQLIB
|
||||
$TESTCASE_ROOT/lib/coq
|
||||
|
||||
$ mkdir -p lib/coq/theories/Init/
|
||||
$ cat > lib/coq/theories/Init/Prelude.v << EOF
|
||||
> Inductive PreludeLoaded := Yes.
|
||||
> EOF
|
||||
|
||||
We need to manually compile the prelude.
|
||||
|
||||
$ coqc -boot -noinit -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler no -R lib/coq/theories/ Coq lib/coq/theories/Init/Prelude.v
|
||||
|
||||
We also setup some plugins
|
||||
|
||||
$ mkdir -p lib/coq-core/plugins
|
||||
|
||||
We setup an installed theory. Note that lib/coq/user-contrib doesn't exist yet,
|
||||
so this also tests that it won't be a problem.
|
||||
|
||||
$ dune build --root B @install
|
||||
Entering directory 'B'
|
||||
Warning: Coq Language Versions lower than 0.8 have been deprecated in Dune
|
||||
3.8 and will be removed in an upcoming Dune version.
|
||||
Hint: To disable this warning, add the following to your dune-project file:
|
||||
(warnings (deprecated_coq_lang_lt_08 disabled))
|
||||
Leaving directory 'B'
|
||||
$ dune install --root B --prefix=$PWD --display=short
|
||||
Installing $TESTCASE_ROOT/lib/B/META
|
||||
Installing $TESTCASE_ROOT/lib/B/dune-package
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmi
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmxs
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.glob
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.v
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.vo
|
||||
|
||||
|
||||
Next we go into our Dune project and build it.
|
||||
$ dune build --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
|
||||
coqdep
|
||||
-boot
|
||||
-R coq/theories Coq
|
||||
-Q $TESTCASE_ROOT/lib/coq/user-contrib/B B
|
||||
-R . A -dyndep opt -vos a.v >
|
||||
_build/default/.A.theory.d
|
||||
coqc -q
|
||||
-w -deprecated-native-compiler-option -native-output-dir .
|
||||
-native-compiler on
|
||||
-nI lib/coq-core/kernel
|
||||
-nI .
|
||||
-boot
|
||||
-R coq/theories Coq
|
||||
-Q $TESTCASE_ROOT/lib/coq/user-contrib/B B
|
||||
-R . A
|
||||
a.v
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
Test for https://github.com/ocaml/dune/issues/7893
|
||||
When using an installed theory with plugins, things should work fine.
|
||||
|
||||
$ dune build --root to_install @all
|
||||
Entering directory 'to_install'
|
||||
Hello
|
||||
Leaving directory 'to_install'
|
||||
$ dune install --root to_install --prefix=$PWD
|
||||
|
||||
We now build the normal theory, and should work
|
||||
|
||||
$ COQPATH=$PWD/lib/coq/user-contrib dune build --root user @all
|
||||
Entering directory 'user'
|
||||
Hello
|
||||
Leaving directory 'user'
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
|
||||
(package (name global))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name plugin)
|
||||
(public_name global.plugin))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = Format.eprintf "Hello@\n%!"
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
Declare ML Module "plugin:global.plugin".
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name Bar)
|
||||
(package global)
|
||||
(plugins global.plugin))
|
||||
|
|
@ -0,0 +1 @@
|
|||
From Bar Require Import bar.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name Foo)
|
||||
(package local)
|
||||
(theories Bar))
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
|
||||
(package (name local))
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive b := .
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name A.B)
|
||||
(package Theory1))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
(package (name Theory1))
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive c := .
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name A.C)
|
||||
(package Theory2))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
(package (name Theory2))
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
If we have installed theories A.B and A.C then Dune should not complain that A
|
||||
is a duplicate theory.
|
||||
|
||||
First we install our two theories with the conflicting name prefix.
|
||||
|
||||
$ (cd B && dune build @install && dune install --prefix .)
|
||||
$ (cd C && dune build @install && dune install --prefix .)
|
||||
|
||||
We add these to COQPATH
|
||||
|
||||
$ export COQPATH=../B/lib/coq/user-contrib:../C/lib/coq/user-contrib:$COQPATH
|
||||
|
||||
Now we create a theory that depends on both
|
||||
|
||||
$ mkdir mytheory && cd mytheory
|
||||
|
||||
$ cat > dune-project << EOF
|
||||
> (lang dune 3.8)
|
||||
> (using coq 0.8)
|
||||
> EOF
|
||||
|
||||
$ cat > dune << EOF
|
||||
> (coq.theory
|
||||
> (name mytheory)
|
||||
> (theories A.B A.C))
|
||||
> EOF
|
||||
|
||||
$ cat > a.v << EOF
|
||||
> From A.B Require Import a.
|
||||
> From A.C Require Import a.
|
||||
> Print b.
|
||||
> EOF
|
||||
|
||||
$ dune build a.vo
|
||||
Inductive b : Prop := .
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
From B Require Import b.
|
||||
Print hello.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name A)
|
||||
(theories Coq B))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(coq.theory
|
||||
(name B)
|
||||
(package B)
|
||||
(theories Coq))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
(package (name "B"))
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
We test that installed Coq theories, when updated, prompt Dune to rebuild
|
||||
|
||||
$ mkdir -p lib/coq
|
||||
$ export COQLIB=$PWD/lib/coq
|
||||
$ echo $COQLIB
|
||||
$TESTCASE_ROOT/lib/coq
|
||||
|
||||
$ mkdir -p lib/coq/theories/Init/
|
||||
$ cat > lib/coq/theories/Init/Prelude.v << EOF
|
||||
> Inductive PreludeLoaded := Yes.
|
||||
> EOF
|
||||
|
||||
We need to manually compile the prelude.
|
||||
|
||||
$ coqc -boot -noinit -w -deprecated-native-compiler-option -w -native-compiler-disabled -native-compiler no -R lib/coq/theories/ Coq lib/coq/theories/Init/Prelude.v
|
||||
|
||||
We also setup some plugins
|
||||
|
||||
$ mkdir -p lib/coq-core/plugins
|
||||
|
||||
We setup an installed theory. Note that lib/coq/user-contrib doesn't exist yet,
|
||||
so this also tests that it won't be a problem.
|
||||
|
||||
$ cat > B/b.v << EOF
|
||||
> Inductive hello := I | am | an | install | loc.
|
||||
> EOF
|
||||
|
||||
$ dune build --root B @install
|
||||
Entering directory 'B'
|
||||
Leaving directory 'B'
|
||||
$ dune install --root B --prefix=$PWD --display=short
|
||||
Installing $TESTCASE_ROOT/lib/B/META
|
||||
Installing $TESTCASE_ROOT/lib/B/dune-package
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmi
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmxs
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.glob
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.v
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.vo
|
||||
|
||||
|
||||
Next we go into our Dune project and build it.
|
||||
$ dune build --root A
|
||||
Entering directory 'A'
|
||||
Inductive hello : Set :=
|
||||
I : hello | am : hello | an : hello | install : hello | loc : hello.
|
||||
Leaving directory 'A'
|
||||
|
||||
Next we update B and install it again.
|
||||
|
||||
$ cat > B/b.v << EOF
|
||||
> Inductive hello := I | am | an | install | loc | but | updated.
|
||||
> EOF
|
||||
|
||||
$ dune build --root B @install
|
||||
Entering directory 'B'
|
||||
Leaving directory 'B'
|
||||
$ dune install --root B --prefix=$PWD --display=short
|
||||
Deleting $TESTCASE_ROOT/lib/B/META
|
||||
Installing $TESTCASE_ROOT/lib/B/META
|
||||
Deleting $TESTCASE_ROOT/lib/B/dune-package
|
||||
Installing $TESTCASE_ROOT/lib/B/dune-package
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmi
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmi
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmxs
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmxs
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/b.glob
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.glob
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/b.v
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.v
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/b.vo
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.vo
|
||||
|
||||
Now we should see that A is rebuilt
|
||||
|
||||
$ dune build --root A
|
||||
Entering directory 'A'
|
||||
Inductive hello : Set :=
|
||||
I : hello
|
||||
| am : hello
|
||||
| an : hello
|
||||
| install : hello
|
||||
| loc : hello
|
||||
| but : hello
|
||||
| updated : hello.
|
||||
Leaving directory 'A'
|
||||
|
||||
Next we add a new file to B that should cause a call to coqdep, but no rebuild.
|
||||
|
||||
$ cat > B/c.v << EOF
|
||||
> Inductive bye := I | am | a | new | install | loc.
|
||||
> EOF
|
||||
|
||||
$ dune build --root B @install
|
||||
Entering directory 'B'
|
||||
Leaving directory 'B'
|
||||
$ dune install --root B --prefix=$PWD --display=short
|
||||
Deleting $TESTCASE_ROOT/lib/B/META
|
||||
Installing $TESTCASE_ROOT/lib/B/META
|
||||
Deleting $TESTCASE_ROOT/lib/B/dune-package
|
||||
Installing $TESTCASE_ROOT/lib/B/dune-package
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmi
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmi
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmxs
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_b.cmxs
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_c.cmi
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/.coq-native/NB_c.cmxs
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/b.glob
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.glob
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/b.v
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.v
|
||||
Deleting $TESTCASE_ROOT/lib/coq/user-contrib/B/b.vo
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/b.vo
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/c.glob
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/c.v
|
||||
Installing $TESTCASE_ROOT/lib/coq/user-contrib/B/c.vo
|
||||
|
||||
Now we should see that A is not rebuilt, however coqdep is called, this seems to fail
|
||||
|
||||
$ dune build --root A --display=short
|
||||
Entering directory 'A'
|
||||
Leaving directory 'A'
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 3.8)
|
||||
(using coq 0.8)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
Testing the composition of the installed stdlib
|
||||
|
||||
$ cat > dune << EOF
|
||||
> (coq.theory
|
||||
> (name test)
|
||||
> (theories Coq))
|
||||
> EOF
|
||||
|
||||
$ dune build test.vo --display=short --always-show-command-line
|
||||
coqdep .test.theory.d
|
||||
coqc Ntest_test.{cmi,cmxs},test.{glob,vo}
|
||||
|
|
@ -0,0 +1 @@
|
|||
From Coq Require Import List.
|
||||
|
|
@ -0,0 +1 @@
|
|||
Inductive hello_alg := I | am | an | install | loc | at_alg.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(coq.theory
|
||||
(name global.algebra)
|
||||
(package global))
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue