forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test(coq): duplicate theory prefix in COQPATH bug This bug happens when using COQPATH so it won't affect most users. When having two theories A.B and A.C installed, dune will erroneously fail saying that the theory A has been defined twice. Signed-off-by: Ali Caglayan <alizter@gmail.com> Signed-off-by: Etienne Millon <me@emillon.org> * fix(coq): first theory in COQPATH takes precedence always Signed-off-by: Ali Caglayan <alizter@gmail.com> Signed-off-by: Etienne Millon <me@emillon.org> * coq: add missing changelog entry Signed-off-by: Ali Caglayan <alizter@gmail.com> Signed-off-by: Etienne Millon <me@emillon.org> --------- Signed-off-by: Ali Caglayan <alizter@gmail.com> Signed-off-by: Etienne Millon <me@emillon.org> Co-authored-by: Ali Caglayan <alizter@gmail.com>
- Loading branch information
Showing
11 changed files
with
63 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/B/a.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Inductive b := . |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/B/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(coq.theory | ||
(name A.B) | ||
(package Theory1)) |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/B/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 3.8) | ||
(using coq 0.8) | ||
(package (name Theory1)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/C/a.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Inductive c := . |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/C/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(coq.theory | ||
(name A.C) | ||
(package Theory2)) |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/C/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 3.8) | ||
(using coq 0.8) | ||
(package (name Theory2)) |
36 changes: 36 additions & 0 deletions
36
test/blackbox-tests/test-cases/coq/compose-installed-prefix-dupe.t/run.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 := . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters