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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 40F7E7FACD for ; Thu, 18 Sep 2014 23:51:22 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.217.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.217.172 as permitted sender) identity=mailfrom; client-ip=209.85.217.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f172.google.com) identity=helo; client-ip=209.85.217.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-lb0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvUBAJFTG1TRVdmsm2dsb2JhbABghDcEgnzOGAGBAwgWAREBAQEBAQYLCwkUKoQDAQEBAwESER0BGx0BAwELBgUEBw0qAgIhAQERAQUBHAYTIogHAQMJCKADa4swgXKDEIk9ChknDWaGRgERAQUOjTyCLQeCeIFTBZp8ghCPBoRQGCmFKyEvgkoBAQE X-IPAS-Result: AvUBAJFTG1TRVdmsm2dsb2JhbABghDcEgnzOGAGBAwgWAREBAQEBAQYLCwkUKoQDAQEBAwESER0BGx0BAwELBgUEBw0qAgIhAQERAQUBHAYTIogHAQMJCKADa4swgXKDEIk9ChknDWaGRgERAQUOjTyCLQeCeIFTBZp8ghCPBoRQGCmFKyEvgkoBAQE X-IronPort-AV: E=Sophos;i="5.04,550,1406584800"; d="scan'208";a="79978128" Received: from mail-lb0-f172.google.com ([209.85.217.172]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Sep 2014 23:51:08 +0200 Received: by mail-lb0-f172.google.com with SMTP id p9so1415994lbv.31 for ; Thu, 18 Sep 2014 14:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=jZIwmTUngMD1I6PwLgJQOILgAJEeNVgsFctGDHANZ+M=; b=vvEhs8LrMbnrRIzLdzUUGufomnLgq4jFOU48RzTii+y6D7WdpfT7flqAGD6E+spjyn 9T3xxQJ5+bvomahaob6yUVuHVW+k5qj7Dt/mDQY2ysb34IpNX470i6dTLSEWT4Nl/2vz FhdRZDBy5VhqLH2IL4zR0lawZugVSZctjDoCWJWXlHH89Ts34MUheGtcXDPQUqP6Mct8 RJ+Yaj2oS6BDckoAeitJJOJVOqwvZfmGjzEAlxFFMmtwF2vGUWgw/dy2m/WWZEzO1nOf Nc1N0gX6A+7HcJhZwuUjplm2w5xDxHB7A8DQj5fAd1JyEQeaZrQPor34+HidjptEeftr q6qw== X-Received: by 10.112.13.232 with SMTP id k8mr2213146lbc.81.1411077067469; Thu, 18 Sep 2014 14:51:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.71 with HTTP; Thu, 18 Sep 2014 14:50:47 -0700 (PDT) In-Reply-To: References: From: Yotam Barnoy Date: Thu, 18 Sep 2014 17:50:47 -0400 Message-ID: To: Anil Madhavapeddy Cc: Ocaml Mailing List Content-Type: multipart/alternative; boundary=001a11c3c47e5b785c05035dfb78 Subject: Re: [Caml-list] opam local switch --001a11c3c47e5b785c05035dfb78 Content-Type: text/plain; charset=UTF-8 OPAMSWITCH appears undocumented, though it's referred to in the man page under opam --switch ("This is equivalent to setting $OPAMSWITCH") My question is, if I set OPAMSWITCH, will I then be able to run regular (non-opam) ocaml build commands in the local shell in the given compiler, while running commands in a different shell with a different compiler? If not, is such a feature planned? -Yotam On Thu, Sep 18, 2014 at 5:24 PM, Anil Madhavapeddy wrote: > 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 > need to compile regular code. Is it possible to switch to another compiler > locally (within a particular shell session) via environment variables, > while using my regular compiler in another shell session? > > > > If this is the way things work already, I apologize in advance -- it > appeared to me that running opam switch modifies some global state that > directly affects other pre-existing shell sessions. > > It's worth reading the man page for OPAM ("man opam" or "opam --help"), > which 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 > > --001a11c3c47e5b785c05035dfb78 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
OPAMSWITCH appears undocumented, though it's referred = to in the man page under opam --switch ("This is equivalent to setting= $OPAMSWITCH")

My question is, if I set OPAMSWITCH,= will I then be able to run regular (non-opam) ocaml build commands in the = local shell in the given compiler, while running commands in a different sh= ell with a different compiler? If not, is such a feature planned?

-Yotam

On Thu, Sep 18, 2014 at 5:24 PM, Anil Madhavapeddy <anil@re= coil.org> wrote:
On 18 Sep 2014, at 22:20, Yotam Barnoy <yotambarnoy@gmail.com> wrote:

> I have a question about opam. I would like to play with certain compil= er versions, but I don't want the switch to happen globally, because I = still need to compile regular code. Is it possible to switch to another com= piler locally (within a particular shell session) via environment variables= , while using my regular compiler in another shell session?
>
> If this is the way things work already, I apologize in advance -- it a= ppeared to me that running opam switch modifies some global state that dire= ctly affects other pre-existing shell sessions.

It's worth reading the man page for OPAM ("man opam" o= r "opam --help"), which lists all the environment variables and c= ommand-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


--001a11c3c47e5b785c05035dfb78--