是否可以制作一个opam“沙盒"? [英] Is it possible to make an opam "sandbox"?

查看:74
本文介绍了是否可以制作一个opam“沙盒"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个用ocaml 4.02.1编译的ocaml项目.有没有一种方法可以为每个项目创建单独的opam安装,而不是让两个项目都在全局4.02.1 opam交换机中安装其依赖项?

I have two ocaml projects being compiled with ocaml 4.02.1. Is there a way to create separate opam installations for each project instead of having both projects install their dependencies in the global 4.02.1 opam switch?

推荐答案

opam中,您可以具有同一编译器的多个安装:

In opam you can have several installations of the same compiler:

opam switch -A 4.02.1 proj1
opam switch -A 4.02.1 proj2

将为每个项目创建两个单独的独立堆栈.您可能还会发现以下命令很有用:

will create two separate independent stacks for each project. You may also find these commands useful:

opam switch export
opam switch import

这篇关于是否可以制作一个opam“沙盒"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆