-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[coq] Allow to install Coq native files under a different package.
The code changes doesn't make me super-happy, tho I think that in general it makes sense for stanzas to produce object files that do belong to multiple packages, as for example it is common in some upstream packagers to allow to install debug and doc files into a different package. However this implies that `Dune_file.stanza_package stanza` is not canonical anymore. Likely to model this better, we may need to define the notion of sub-packages of a stanza / package, but awaiting for feedback.
- Loading branch information
Showing
15 changed files
with
175 additions
and
74 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
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
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
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/native-split-package.t/bar/bar.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,3 @@ | ||
From foo Require Import foo. | ||
|
||
Definition mynum (i : mynat) := 3. |
9 changes: 9 additions & 0 deletions
9
test/blackbox-tests/test-cases/coq/native-split-package.t/bar/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,9 @@ | ||
(coq.theory | ||
(name bar) | ||
(package base) | ||
(mode | ||
(native | ||
(package base-native))) | ||
(theories foo) | ||
(modules :standard) | ||
(synopsis "Test Coq library")) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/native-split-package.t/baz/a/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 @@ | ||
Definition aa := 4. |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/native-split-package.t/baz/b/uu.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 @@ | ||
Definition uu := 5. |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/coq/native-split-package.t/baz/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,6 @@ | ||
(coq.theory | ||
(name moo.baz) | ||
(package base) | ||
(theories foo bar)) | ||
|
||
(include_subdirs qualified) |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/coq/native-split-package.t/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,6 @@ | ||
(rule | ||
(alias default) | ||
(action | ||
(progn | ||
(echo "%{read:base.install}") | ||
(echo "%{read:base-native.install}")))) |
10 changes: 10 additions & 0 deletions
10
test/blackbox-tests/test-cases/coq/native-split-package.t/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,10 @@ | ||
(lang dune 3.0) | ||
(using coq 0.4) | ||
|
||
(package | ||
(name base)) | ||
|
||
(package | ||
(name base-native) | ||
(depends | ||
(base (= :version)))) |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/coq/native-split-package.t/foo/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,6 @@ | ||
(coq.theory | ||
(name foo) | ||
(package base) | ||
(mode native) | ||
(modules :standard) | ||
(synopsis "Test Coq library")) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/native-split-package.t/foo/foo.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 @@ | ||
Definition mynat := nat. |
43 changes: 43 additions & 0 deletions
43
test/blackbox-tests/test-cases/coq/native-split-package.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,43 @@ | ||
$ dune build --profile=release --display short --debug-dependency-path @all | ||
coqdep bar/bar.v.d | ||
coqdep foo/foo.v.d | ||
coqdep baz/a/a.v.d | ||
coqdep baz/b/uu.v.d | ||
coqc foo/.foo.aux,foo/foo.{glob,vo} | ||
coqc baz/a/.a.aux,baz/a/a.{glob,vo} | ||
coqc baz/b/.uu.aux,baz/b/uu.{glob,vo} | ||
coqnative foo/Nfoo_foo.{cmi,cmxs} | ||
coqc bar/.bar.aux,bar/bar.{glob,vo} | ||
coqnative baz/a/Nmoo_baz_a_a.{cmi,cmxs} | ||
coqnative baz/b/Nmoo_baz_b_uu.{cmi,cmxs} | ||
coqnative bar/Nbar_bar.{cmi,cmxs} | ||
|
||
$ dune build --profile=release --debug-dependency-path @default | ||
lib: [ | ||
"_build/install/default/lib/base/META" | ||
"_build/install/default/lib/base/dune-package" | ||
] | ||
lib_root: [ | ||
"_build/install/default/lib/coq/user-contrib/bar/bar.v" {"coq/user-contrib/bar/bar.v"} | ||
"_build/install/default/lib/coq/user-contrib/bar/bar.vo" {"coq/user-contrib/bar/bar.vo"} | ||
"_build/install/default/lib/coq/user-contrib/foo/.coq-native/Nfoo_foo.cmi" {"coq/user-contrib/foo/.coq-native/Nfoo_foo.cmi"} | ||
"_build/install/default/lib/coq/user-contrib/foo/.coq-native/Nfoo_foo.cmxs" {"coq/user-contrib/foo/.coq-native/Nfoo_foo.cmxs"} | ||
"_build/install/default/lib/coq/user-contrib/foo/foo.v" {"coq/user-contrib/foo/foo.v"} | ||
"_build/install/default/lib/coq/user-contrib/foo/foo.vo" {"coq/user-contrib/foo/foo.vo"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/a/.coq-native/Nmoo_baz_a_a.cmi" {"coq/user-contrib/moo/baz/a/.coq-native/Nmoo_baz_a_a.cmi"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/a/.coq-native/Nmoo_baz_a_a.cmxs" {"coq/user-contrib/moo/baz/a/.coq-native/Nmoo_baz_a_a.cmxs"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/a/a.v" {"coq/user-contrib/moo/baz/a/a.v"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/a/a.vo" {"coq/user-contrib/moo/baz/a/a.vo"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/b/.coq-native/Nmoo_baz_b_uu.cmi" {"coq/user-contrib/moo/baz/b/.coq-native/Nmoo_baz_b_uu.cmi"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/b/.coq-native/Nmoo_baz_b_uu.cmxs" {"coq/user-contrib/moo/baz/b/.coq-native/Nmoo_baz_b_uu.cmxs"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/b/uu.v" {"coq/user-contrib/moo/baz/b/uu.v"} | ||
"_build/install/default/lib/coq/user-contrib/moo/baz/b/uu.vo" {"coq/user-contrib/moo/baz/b/uu.vo"} | ||
] | ||
lib: [ | ||
"_build/install/default/lib/base-native/META" | ||
"_build/install/default/lib/base-native/dune-package" | ||
] | ||
lib_root: [ | ||
"_build/install/default/lib/coq/user-contrib/bar/.coq-native/Nbar_bar.cmi" {"coq/user-contrib/bar/.coq-native/Nbar_bar.cmi"} | ||
"_build/install/default/lib/coq/user-contrib/bar/.coq-native/Nbar_bar.cmxs" {"coq/user-contrib/bar/.coq-native/Nbar_bar.cmxs"} | ||
] |