-
Notifications
You must be signed in to change notification settings - Fork 755
Adding package management infrastructure #21564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cea4b52
3c1e8f8
0d76ee6
a17d1db
3addf1d
23c6c90
b048705
8131307
76dbd18
f7f9f19
fb93366
1934c83
9346d07
f105c60
08960a6
d7e43b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| description = "The Rocq Prover's Core library (including Prelude)." | ||
| rocqpath = "Corelib" | ||
| requires = "rocq-runtime.plugins.ltac" | ||
| requires += "rocq-runtime.plugins.tauto" | ||
| requires += "rocq-runtime.plugins.cc" | ||
| requires += "rocq-runtime.plugins.firstorder" | ||
| requires += "rocq-runtime.plugins.number_string_notation" | ||
| requires += "rocq-runtime.plugins.btauto" | ||
| requires += "rocq-runtime.plugins.rtauto" | ||
| requires += "rocq-runtime.plugins.ring" | ||
| requires += "rocq-runtime.plugins.nsatz" | ||
| requires += "rocq-runtime.plugins.zify" | ||
| requires += "rocq-runtime.plugins.micromega" | ||
| requires += "rocq-runtime.plugins.funind" | ||
| requires += "rocq-runtime.plugins.ssreflect" | ||
| requires += "rocq-runtime.plugins.derive" | ||
|
|
||
| package "ltac2" ( | ||
| directory = "ltac2" | ||
| description = "The Rocq Prover's Ltac2 standard library." | ||
| rocqpath = "Ltac2" | ||
| requires = "rocq-core" | ||
| requires += "rocq-runtime.plugins.ltac2_ltac1" | ||
| requires += "rocq-runtime.plugins.ltac2" | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| - **Added:** | ||
| New notion of Rocq package and installation layout supported by a new | ||
| command-line option ``-package DEP`` that automatically adds the correct | ||
| ``-Q`` and ``-I`` options for ``DEP`` and its transitive dependencies. | ||
| For backwards compatibility, the old installation scheme targeting the | ||
| ``coq/user-contrib`` directory is kept, but the plan is to remove it | ||
| after packages have been ported to the new installation scheme. | ||
| The ``rocq makefile`` command can be made to rely on the new installation | ||
| scheme by passing the ``--rocq-package PKGNAME`` argument, and optionally | ||
| the ``--legacy-support`` argument to also install using the legacy | ||
| installation scheme | ||
| (`#21564 <https://github.com/rocq-prover/rocq/pull/21564>`_, | ||
| by Rodolphe Lepigre). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ There are several Rocq commands: | |
| several other IDEs such as Proof General, vsCoq and Coqtail that are not | ||
| included with the Coq installation. | ||
| + ``rocq``: the main entry point for the Rocq prover | ||
| + ``rocq find``: queries installed Rocq packages and prints their load-path information | ||
| + ``rocqchk``: the Rocq checker (validation of compiled libraries) (also available through ``rocq check``) | ||
|
|
||
| Many of the parameters to start these tools are shared and are described below. | ||
|
|
@@ -73,6 +74,45 @@ See :ref:`rocq_makefile` and :ref:`building_dune`. | |
| .. rocqdoc:: | ||
| -R <PATH> Mod1 | ||
|
|
||
| .. _rocqfind: | ||
|
|
||
| Rocq package lookup (rocq find) | ||
| ------------------------------- | ||
|
|
||
| The ``rocq find`` command queries Rocq packages installed through | ||
| OCamlfind. A Rocq package is an OCamlfind package whose ``META`` file | ||
| contains a ``rocqpath`` field; this field gives the Rocq logical path | ||
| provided by the package. Package names passed to ``rocq find`` are | ||
| OCamlfind package names, not Rocq logical paths. Its command-line syntax is | ||
| ``rocq find [-Q] [-I] [package ...]``. | ||
|
|
||
| With no package argument, ``rocq find`` lists all installed Rocq packages. | ||
| With one or more package arguments, it lists those packages and their | ||
| transitive dependencies. Its default output contains one line per Rocq | ||
| theory package, with the physical theory directory followed by the logical | ||
| path, for example:: | ||
|
|
||
| $ rocq find rocq-stdlib | ||
| /path/to/lib/rocq-stdlib/rocq.d Stdlib | ||
|
|
||
| The ``-Q`` and ``-I`` options make ``rocq find`` print command-line | ||
| arguments instead. ``-Q`` prints the load-path bindings for Rocq theory | ||
| packages, and ``-I`` prints OCaml include path arguments for OCamlfind | ||
| packages needed by the requested packages, such as plugin dependencies. | ||
| They can be combined:: | ||
|
|
||
| $ rocq find -Q -I my-package | ||
| -Q '/path/to/lib/my-package/rocq.d' MyPackage | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the quoting here? (ocaml, shell, other?)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's using
|
||
| -I '/path/to/lib/my-package' | ||
|
|
||
| For direct invocation of Rocq tools, the ``-package`` option is usually | ||
| more convenient; see :ref:`command-line-options`. ``rocq find`` is useful | ||
| for inspecting an installation and for build systems that need to obtain | ||
| explicit ``-Q`` and ``-I`` arguments. | ||
|
|
||
| See :ref:`rocq_package_layout` for the installation layout assumed by | ||
| ``rocq find``. | ||
|
|
||
| .. _system_config: | ||
|
|
||
| System configuration | ||
|
|
@@ -309,6 +349,11 @@ and ``rocq repl``, unless stated otherwise: | |
| :-R *directory dirpath*: Similar to ``-Q`` *directory dirpath*, but allows using | ||
| :cmd:`Require` with a partially qualified name (i.e. without a `From` clause). | ||
|
|
||
| :-package *dependency*: automatically adds the necessary ``-Q`` and ``-I`` | ||
| arguments to be able to work with the Rocq package *dependency* (defined in | ||
| terms of an ``ocamlfind`` package) and its transitive dependencies. See | ||
| :ref:`rocqfind` and :ref:`rocq_package_layout`. | ||
|
|
||
| :-top *dirpath*: Set the logical module name to :n:`@dirpath` for the | ||
| `rocq repl` interactive session. If no module name is specified, | ||
| `rocq repl` will default to ``Top``. `rocq compile` does not accept this option | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.