[opam-devel] opam pinning to local repo

Ashish Agarwal agarwal1975 at gmail.com
Sun Aug 17 17:16:37 BST 2014


I'm trying out 1.2.0-beta4 and wondering what is the correct workflow for
local development packages.

Say I have a local package `foo` that is not defined in any repository. I
put an opam file in the root of the package's source directory, then did
`opam pin add foo ~/code/foo`. However, opam doesn't detect the opam file,
and instead says "package not defined, would I like to define a new
package". At this point you have to answer yes, and opam creates a new opam
file, which is not what I want.

Even if the package is defined in a repository, I want opam to detect the
opam file in the source directory, not that defined in the repo.

The recent platform blog post says opam pin "will generate a new package on
the fly by detecting the presence of an opam file within the source
repository itself". Where should this opam file be?

Note I'm trying to simplify my previous workflow, where I would put the
opam file in the source directory at the path
"opam/packages/foo/foo.master/opam". Then I would first add this as a repo
and also pin to this directory. I'm trying to avoid the first part; I
shouldn't have to add a repo per package.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/opam-devel/attachments/20140817/97e00960/attachment.html>


More information about the opam-devel mailing list