caml-list - the Caml user's mailing list
 help / Atom feed
From: Kenichi Asai <asai@is.ocha.ac.jp>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Local switch using opam 2
Date: Sat, 13 Apr 2019 20:15:15 +0900
Message-ID: <20190413111515.GA37936@pllab.is.ocha.ac.jp> (raw)
In-Reply-To: <CAPFanBF=A589DG_OX0fZOUK9ev5-5SyF1jQvE5viCQCt7quLfg@mail.gmail.com>

Dear Gabriel,

> Our short-term plan is to merge opam file in the OCaml compiler distribution so
> that "opam pin ." or "opam install ." or "opam switch create ." works as for
> any other opam packages. There is an in-progress proposal by Leo White in
> https://github.com/ocaml/ocaml/pull/2207 ; before that gets finished and
> integrated, please feel free to download the patch proposed and use it locally.

Thank you.  It worked.  For record, I write what I did:

- create a directory containing the OCaml distribution
- change it as I want
- at the top directory of the OCaml distribution,
  * place ocaml-variants.opam as found in the above pull request
  * opam switch create . --empty
  * opam install .

However, I found that this local switch is valid only in the above
directory and I cannot set it as my default OCaml compiler.

So, I looked around the .opam directory and found this low-level thing
that corresponds to what I did for opam 1.2:

cd ~/.opam/repo
rm state.cache  -- necessary to include the following new variant info
cd default/packages/ocaml-variants/
mkdir ocaml-variants.4.04.0+my-own-variant
cd ocaml-variants.4.04.0+my-own-variant

Then, I place the opam file in this directory that designates the
base OCaml compiler and the url of the patch I want to apply.  I could
find many examples of opam files under

~/.opam/repo/default-packages/ocaml-variants/*/

I then execute:

opam switch install 4.04.0+my-own-variant

and it worked as though it is one of the standard ocaml variants.

-- 
Kenichi Asai

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  0:35 Kenichi Asai
2019-04-10  9:08 ` Gabriel Scherer
2019-04-13 11:15   ` Kenichi Asai [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190413111515.GA37936@pllab.is.ocha.ac.jp \
    --to=asai@is.ocha.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox