Let’s suppose I have a repository compiled with jbuilder and released with topkg that generates two opam packages x and a dependent package x-y. In x-y.opam, I have the dependency:
depends: [
"x"
...
]
However, this is a problem because x-y version σ depends on the same version of x (for security because it uses internal APIs which may evolve more quickly than the external one). Is there a way to automatically have
depends: [
"x" {= "σ"}
...
]
when submitting the package? I tried "x" {= "%%VERSION%%"} but it does not work and would be problematic with pinned packages anyway. What is the recommended way of doing this with topkg?
With opam v2 you can access the name and version of the current package via _:name and _:version variables but I highly suspect you are not allowed to use these in version constraints.