Skip to content

Minimal opam file incompatibility on v1.2 and v2 when pinning #3403

@bobbypriam

Description

@bobbypriam

I have the following minimal todolist.opam file:

opam-version: "1.2"
name: "todolist"
version: "1.0.0"
maintainer: "Your Name <email@example.com>"

depends: [
  "jbuilder" {build}
  "caqti"
  "caqti-lwt"
  "caqti-driver-postgresql"
]

I'm having trouble pinning this package with opam 2.0.0~rc2.

With opam.1.2.2 (working as expected, installing the dependencies):

$ opam pin add todolist .
Package todolist does not exist, create as a NEW package ? [Y/n] y
todolist is now path-pinned to /Users/bobbypriambodo/Projects/todolist

[todolist] /Users/bobbypriambodo/Projects/todolist/ synchronized
[todolist] Installing new package description from /Users/bobbypriambodo/Projects/todolist

todolist needs to be installed.
The following actions will be performed:
  ∗  install conf-m4                 1           [required by ocamlfind]
  ∗  install jbuilder                1.0+beta20  [required by todolist]
  ...

With opam.2.0.0~rc2 (not working):

$ opam pin add todolist .
Package todolist does not exist, create as a NEW package? [Y/n] y
[todolist.~dev] synchronised from git+file:///Users/bobbypriambodo/Projects/todolist#master
[NOTE] No package definition found for todolist.~dev: please complete the template
Press enter to start "vim" (this can be customised by setting EDITOR or OPAMEDITOR)...

When I press enter, an editor opened with a newly created opam file template which I don't want. Changing opam-version to "2.0" gives the same outcome. From the Packaging doc, the necessary fields should only be opam-version and maintainer. Do you know where I did wrong?

# opam config report
# opam-version      2.0.0~rc2
# self-upgrade      no
# system            arch=x86_64 os=macos os-distribution=homebrew os-version=10.12.6
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              3
# repositories      1 (http) (default repo at 3faa926b)
# pinned            3 (git)
# current-switch    default

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions