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 [thread overview]
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
prev parent reply other threads:[~2019-04-13 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 0:35 Kenichi Asai
2019-04-10 9:07 ` Gabriel Scherer
2019-04-13 11:15 ` Kenichi Asai [this message]
Reply instructions:
You may reply publicly 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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox