caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anil Madhavapeddy <anil@recoil.org>
To: Alain Frisch <alain@frisch.fr>
Cc: Thomas Gazagnaire <thomas@ocamlpro.com>,
	OCaml mailing-list <caml-list@inria.fr>,
	Mirage List <cl-mirage@lists.cam.ac.uk>
Subject: Re: [Caml-list] [ANN] beta-release of OPAM
Date: Fri, 18 Jan 2013 10:42:04 +0000	[thread overview]
Message-ID: <DF5C351C-2B6D-4AA6-BCE7-3A9F0366CCCB@recoil.org> (raw)
In-Reply-To: <50F92486.2020704@frisch.fr>

On 18 Jan 2013, at 10:31, Alain Frisch <alain@frisch.fr> wrote:

> On 01/17/2013 06:22 PM, Anil Madhavapeddy wrote:
>> I added `opam switch 4.01.0dev+trunk` recently, which will grab the latest trunk snapshot.
>> To reinstall it and refresh to a newer snapshot, just do `opam switch reinstall 4.01.0dev+trunk`, which will also attempt to recompile any packages you had in there before.
> 
> Thanks, this is exactly what I wanted!
> 
> Shouldn't the package be called simply "trunk", without a reference to a version number?

Yeah, but OPAM also has compiler version constraints, so that you can mark a package as requiring {>=4.00} for example.  If the package is just marked trunk, then we need to manually record the version number somewhere.

One option is to have a very high version, so that any packages with a lower bound will continue to work.  The other option (which I chose) is to pick the current working version, since compiler releases only happen a couple of times a year.  We can improve on this...

> I've started to play with opam a little bit, and it's a surprisingly pleasant experience.  Thanks to everyone who contributed to this project!
> 
> Now I want to create my first package.  I've followed the instructions from http://opam.ocamlpro.com/doc/Packaging.html but I don't know where to find opam-mk-repo (I've installed opam from the amd64 linux binary).

(that binary is hopefully just a stopgap until the OPAM binary packages become more widely available)

opam-mk-repo is installed as part of OPAM, so you'll need to install from source.  However, you don't actually need to create a repository unless you want to host a mirror of the tarballs.  Simply try this:

$ mkdir -p my-repo/packages
$ opam remote add localdev my-repo
<create your package inside my-repo/packages/>
$ opam update
<the new packages will be available>
$ opam install <new-package>

The same applies for compilers.

If you specify a git:// or darcs:// URL in the package `url` file, a subsequent `opam update` will refresh the working copy from the remote source.

If you want to work with a local copy of that package, just do `opam pin <package> <dir>`.

If you want the bleeding edge version of a stable package, you can even do `opam pin <package> git://foo/bar`.

Quite the swiss-army knife, but each of those scenarios has come in useful at one point or another, particularly when hacking on Mirage which requires rebuilding lots of forward dependencies if (e.g.) a network driver library is being modified.

-anil

  reply	other threads:[~2013-01-18 10:42 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 15:40 Thomas Gazagnaire
2013-01-15 15:42 ` [Caml-list] " Anil Madhavapeddy
2013-01-15 16:17   ` Thomas Gazagnaire
2013-01-15 19:18     ` Alan Schmitt
2013-01-15 19:25       ` Fabrice Le Fessant
2013-01-15 19:29         ` Anil Madhavapeddy
2013-01-15 19:45           ` Roberto Di Cosmo
2013-01-15 21:12             ` Wojciech Meyer
2013-01-16 10:01               ` [Caml-list] " Anil Madhavapeddy
2013-01-16 10:08                 ` Wojciech Meyer
2013-01-16 12:13                   ` Gabriel Scherer
2013-01-16 14:43                     ` Wojciech Meyer
2013-01-16 14:50                       ` Gabriel Scherer
2013-01-16 17:27                 ` Fabrice Le Fessant
2013-01-16 17:40                   ` Thomas Gazagnaire
2013-01-16 17:46                     ` Fabrice Le Fessant
2013-01-16 20:22                       ` Roberto Di Cosmo
2013-01-15 20:02     ` [Caml-list] " Daniel Bünzli
2013-01-15 22:16       ` Thomas Gazagnaire
2013-01-15 17:45 ` [Caml-list] " Daniel Bünzli
2013-01-17  7:52   ` [Caml-list] " Sylvain Le Gall
2013-01-16 16:54 ` [Caml-list] " Mike Lin
2013-01-16 17:29   ` Daniel Bünzli
2013-01-17 17:15 ` Alain Frisch
2013-01-17 17:22   ` Anil Madhavapeddy
2013-01-18 10:31     ` Alain Frisch
2013-01-18 10:42       ` Anil Madhavapeddy [this message]
2013-01-18 10:46         ` Fabrice Le Fessant
2013-01-22 15:57           ` Thomas Gazagnaire
2013-01-18 11:19         ` Alain Frisch
2013-01-18 11:27           ` Anil Madhavapeddy
2013-01-18 16:23             ` Opam package publication (was Re: [Caml-list] [ANN] beta-release of OPAM) Daniel Bünzli
2013-01-19  9:07               ` Philippe Veber
2013-01-19 10:40                 ` Daniel Bünzli
2013-01-22 15:46                   ` Thomas Gazagnaire
2013-01-22 16:23                     ` Daniel Bünzli
2013-01-22 16:48                       ` Thomas Gazagnaire
2013-01-22 17:05                         ` Daniel Bünzli
2013-01-22 16:35                   ` Alain Frisch
2013-01-22 16:50                     ` Fabrice Le Fessant
2013-01-22 16:53                     ` Thomas Gazagnaire
2013-01-22 16:59                     ` Daniel Bünzli
2013-01-22 18:03                     ` Anil Madhavapeddy
2013-01-17 19:33 ` [Caml-list] Re: [ANN] beta-release of OPAM Hongbo Zhang
2013-01-18 12:18 ` [Caml-list] " aditya siram
2013-01-18 18:23   ` Thomas Gazagnaire

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=DF5C351C-2B6D-4AA6-BCE7-3A9F0366CCCB@recoil.org \
    --to=anil@recoil.org \
    --cc=alain@frisch.fr \
    --cc=caml-list@inria.fr \
    --cc=cl-mirage@lists.cam.ac.uk \
    --cc=thomas@ocamlpro.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;
as well as URLs for NNTP newsgroup(s).