It seems that jbuilder subst doesn't check if a version field is already present in the opam file before adding a new one. It should either: don't add a new field of already present or (probably better) replace the field with some new contents.
To reproduce:
$ cat foo.opam
version: "foo"
$ jbuilder subst
$ git diff
diff --git a/foo.opam b/foo.opam
index d228968..3711f0d 100644
--- a/foo.opam
+++ b/foo.opam
@@ -1 +1,2 @@
+version: "34185ff"
version: "foo"
It seems that
jbuilder substdoesn't check if a version field is already present in the opam file before adding a new one. It should either: don't add a new field of already present or (probably better) replace the field with some new contents.To reproduce: