我使用zarith处理任意大小的整数。
我在opam.ocaml.org上可以找到的最新版本是v1.9.1 (发布于2019年8月)。在该项目的github页面上,我阅读了Latest commit a9a309d on 23 Jan (2020)。
我想换新的版本,但我该怎么做呢?我也想
opam开心,并且请帮帮我!
发布于 2020-06-21 21:10:50
如果您确实需要使用未发布的、正在开发的zarith版本,则可以使用--dev-repo选项opam pin add。
opam pin add --dev-repo zarith
opam install zarith发布于 2020-06-21 19:54:53
事实上,目前1.9.1是作为opam包(https://opam.ocaml.org/packages/zarith/)和GitHub标记(https://github.com/ocaml/Zarith/tags)提供的Zarith的最新版本。
但是,考虑到这个上游Git存储库还包含一个规格文件,您也可以使用opam安装master分支中可用的最新开发版本,或者如果需要的话,只依靠所谓的opam就可以精确地提交Git。
因此,您可以选择运行:
opam pin add -n -y -k git zarith.dev --dev-repo或
opam pin add -n -y -k git zarith.dev "https://github.com/ocaml/Zarith.git#master"或
opam pin add -n -y -k git zarith.dev "https://github.com/ocaml/Zarith.git#a9a309d0596d93b6c0c902951e1cae13d661bebd"然后:
opam install zarith关于opam-pin命令的更多细节
.dev版本后缀在语法上是不需要的,但实际上是推荐的,因为zarith.opam文件没有指定任何版本。更确切地说:- If you have other dependencies that would complain of `zarith.dev` when being installed, you can replace the version suffix of `dev` with any compatible version string, "close" to the commit or branch you selected.
- However if you omit this version, `opam` will typically pick the latest version string from the [`opam` package repository](https://opam.ocaml.org/packages/) (i.e., 1.9.1), which wouldn't necessarily match the code of the Git branch or commit you selected.-n、-y和-k是选项的简短形式:- `--no-action` (don't install the package readily but wait the subsequent `opam install` command),
- `--yes` (answer potential yes/no questions without prompting − a common `opam pin` question is `Package foo does not exist, create as a NEW package? [Y/n]` if ever you'd want to install a custom package not yet released in the [opam-repository](https://github.com/ocaml/opam-repository)),
- `--kind=KIND` (as there are several `KINDS` of pinning, the most typical being `version`, `path`, and `git`)https://stackoverflow.com/questions/62502689
复制相似问题