From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id AD8BC7FACD for ; Thu, 18 Sep 2014 23:24:35 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=pra; client-ip=5.153.225.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=mailfrom; client-ip=5.153.225.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@bark.recoil.org) identity=helo; client-ip=5.153.225.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="postmaster@bark.recoil.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj0GAD9NG1QFmeEz/2dsb2JhbABggw1kA0PRGAELgQAWAXmEBAEBAwE6PwULC0YhNgYTiCoDCQy7Gg2HLAEXjUqBejMHLoMAgR0FmnyCEIdJhz2GQoNfa4JKAQEB X-IPAS-Result: Aj0GAD9NG1QFmeEz/2dsb2JhbABggw1kA0PRGAELgQAWAXmEBAEBAwE6PwULC0YhNgYTiCoDCQy7Gg2HLAEXjUqBejMHLoMAgR0FmnyCEIdJhz2GQoNfa4JKAQEB X-IronPort-AV: E=Sophos;i="5.04,549,1406584800"; d="scan'208";a="96507823" Received: from bark.recoil.org ([5.153.225.51]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2014 23:24:35 +0200 Received: from [192.168.1.113] (cpc7-cmbg14-2-0-cust238.5-4.cable.virginm.net [86.30.244.239]); by bark.recoil.org (OpenSMTPD) with ESMTPSA id 1d1c87c3; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; Thu, 18 Sep 2014 22:25:20 +0100 (BST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) From: Anil Madhavapeddy In-Reply-To: Date: Thu, 18 Sep 2014 22:24:24 +0100 Cc: Ocaml Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Yotam Barnoy X-Mailer: Apple Mail (2.1878.6) Subject: Re: [Caml-list] opam local switch On 18 Sep 2014, at 22:20, Yotam Barnoy wrote: > I have a question about opam. I would like to play with certain compiler = versions, but I don't want the switch to happen globally, because I still n= eed to compile regular code. Is it possible to switch to another compiler l= ocally (within a particular shell session) via environment variables, while= using my regular compiler in another shell session? >=20 > If this is the way things work already, I apologize in advance -- it appe= ared to me that running opam switch modifies some global state that directl= y affects other pre-existing shell sessions. It's worth reading the man page for OPAM ("man opam" or "opam --help"), whi= ch lists all the environment variables and command-line options available. There is OPAMSWITCH (or the command line --switch option) which will fix a = particular switch to run the opam command set in. best, Anil