Skip to content

Per-package version support in generated opam files. #3287

@toots

Description

@toots

Hi! I hope I'm not filling an issue that has already been discussed.

Desired Behavior

While converting existing projects to dune, support for multiple projects is really convenient, such as in https://github.com/savonet/ocaml-posix

However, one simple functionality that seems to be missing is the capacity to override the global project version in generated opam files.

I believe such support would either allow or be a required first step to allow to release sub-packages independently.

Releasing sub-packages independently is an important feature in the long-run, to be able to quickly push an important fix in one sub-package without having to release all its associated packages.

Example

(version 2.0.0)

(package
 (name posix-base)
 (synopsis "Base module for the posix bindings")
 (description "posix-base provides base tools for the posix binding modules.")
 (depends
  (dune (> 2.0))
  integers
  ctypes)
)

(package
 (name posix-signal)
 (version 2.0.1)
 (synopsis "Bindings for the types defined in <signal.h>")
 (description "posix-signal provides an API to the types and bindings defined in <signal.h>")
 (depends
  (dune (> 2.0))
  (posix-base (= :version))
  ctypes)
)

(package
 (name posix-types)
 (synopsis "Bindings for the types defined in <sys/types.h>")
 (description "posix-types provides an API to the types defined in <sys/types.h>")
 (depends
  (dune (> 2.0))
  (posix-base (= :version))
  ctypes)
)

Metadata

Metadata

Assignees

No one assigned

    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