我正在尝试使用jbuilder构建一个非常简单的项目(基于jbuilder项目本身的示例)。 Jbuilder似乎内置了一些OPAM集成/ OPAM认知。如何禁用它并指示jbuilder只构建我在构建目录中要求的特定文件?
以下是jbuild
./jbuild
(jbuild_version 1)
(library
((name hello_world)
(public_name hello_world)))
这里是hello_world.ml
let message = "hello world!"
当我运行jbuilder build --only hello_world --root .
时(我认为会禁用与opam相关的逻辑)
我收到了错误
File "jbuild", line 5, characters 5-30:
Error: You cannot declare items to be installed without adding a <package>.opam file at the root of your project.
To declare elements to be installed as part of package "hello_world", add a "hello_world.opam" file at the root of your project.
Exit 1
我唯一能做的就是hello_world.cmo
文件...以及jbuilder为了生成它而执行的命令的日志。
答案 0 :(得分:0)
可能有一种方法可以禁用该行为,但使用它的最简单方法是创建一个空的hello_world.opam
文件(或public_name
的任何文件):
touch hello_world.opam