diff mbox series

[bug#47768,v2,11/43] gnu: ocaml-migrate-parsetree: Update to 2.1.0.

Message ID 20210510051628.15359-12-pukkamustard@posteo.net
State Accepted
Headers show
Series Assorted OCaml patches (V2) | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

pukkamustard May 10, 2021, 5:15 a.m. UTC
* gnu/packages/ocaml.scm (ocaml-migrate-parsetree): Update to 2.1.0.
  (ocaml-migrate-parsetree-1): New variable.
---
 gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)

Comments

Xinglu Chen May 25, 2021, 7:18 p.m. UTC | #1
On Mon, May 10 2021, pukkamustard wrote:

> * gnu/packages/ocaml.scm (ocaml-migrate-parsetree): Update to 2.1.0.
>   (ocaml-migrate-parsetree-1): New variable.

What’s the reason for keeping the old version of
‘ocaml-migrate-parsetree’?

Also, this commit could probably be squashed with 10/43.
pukkamustard June 1, 2021, 8:04 p.m. UTC | #2
Hi,

Xinglu Chen <public@yoctocell.xyz> writes:

> On Mon, May 10 2021, pukkamustard wrote:
>
>> * gnu/packages/ocaml.scm (ocaml-migrate-parsetree): Update to 
>> 2.1.0.
>>   (ocaml-migrate-parsetree-1): New variable.
>
> What’s the reason for keeping the old version of
> ‘ocaml-migrate-parsetree’?

There are two reasons:

1. ocaml4.07-* packages seem to require ocaml-migrate-parsetree 
version 1.*.
2. There are some ocaml-* packages that require the old version of 
ocaml-migrate-parsetree (e.g. ocaml-bisect-ppx or ocaml-mdx).

There are a couple of other ocaml packages with two versions. The 
older version is just named ocaml4.07-NAME (e.g. ocaml-sexplib is 
version 0.14.0 and ocaml4.07-sexplib is version 0.11.0). For 
ocaml-migrate-parsetree this does not work as some ocaml-* 
packages require the old version - thus ocaml-migrate-parsetree-1.

> Also, this commit could probably be squashed with 10/43.

Done.
Xinglu Chen June 1, 2021, 8:19 p.m. UTC | #3
On Tue, Jun 01 2021, pukkamustard wrote:

> Hi,
>
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>> On Mon, May 10 2021, pukkamustard wrote:
>>
>>> * gnu/packages/ocaml.scm (ocaml-migrate-parsetree): Update to 
>>> 2.1.0.
>>>   (ocaml-migrate-parsetree-1): New variable.
>>
>> What’s the reason for keeping the old version of
>> ‘ocaml-migrate-parsetree’?
>
> There are two reasons:
>
> 1. ocaml4.07-* packages seem to require ocaml-migrate-parsetree 
> version 1.*.
> 2. There are some ocaml-* packages that require the old version of 
> ocaml-migrate-parsetree (e.g. ocaml-bisect-ppx or ocaml-mdx).
>
> There are a couple of other ocaml packages with two versions. The 
> older version is just named ocaml4.07-NAME (e.g. ocaml-sexplib is 
> version 0.14.0 and ocaml4.07-sexplib is version 0.11.0). For 
> ocaml-migrate-parsetree this does not work as some ocaml-* 
> packages require the old version - thus ocaml-migrate-parsetree-1.

OK, thanks for the explanation.
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index faa024b261..0b606e296c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1771,32 +1771,51 @@  module of this library is parameterised by the type of S-expressions.")
 (define-public ocaml-migrate-parsetree
   (package
     (name "ocaml-migrate-parsetree")
-    (version "1.8.0")
+    (version "2.1.0")
     (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url (string-append home-page ".git"))
+             (url home-page)
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
+         "1cpgdqcs624nd1p271ddakgyibl0ia4f6dzivnz9qdwszsinwr89"))))
     (build-system dune-build-system)
-    (arguments
-     `(#:tests? #f))
+    (arguments `(#:tests? #f))
     (propagated-inputs
      `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
        ("ocamlbuild" ,ocamlbuild)
        ("ocaml-result" ,ocaml-result)))
-    (properties `((upstream-name . "ocaml-migrate-parsetree")))
+    (properties `((upstream-name . "ocaml-migrate-parsetree")
+                  ;; OCaml 4.07 packages require version 1.*
+                  (ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-migrate-parsetree-1)))))
     (synopsis "OCaml parsetree converter")
     (description "This library converts between parsetrees of different OCaml
 versions.  For each version, there is a snapshot of the parsetree and conversion
 functions to the next and/or previous version.")
     (license license:lgpl2.1+)))
- 
+
+(define-public ocaml-migrate-parsetree-1
+  (package
+    (inherit ocaml-migrate-parsetree)
+    (name "ocaml-migrate-parsetree-1")
+    (version "1.8.0")
+    (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
+    (properties '((upstream-name . "ocaml-migrate-parsetree")))))
+
 (define-public ocaml-ppx-tools-versioned
   (package
     (name "ocaml-ppx-tools-versioned")
@@ -1815,7 +1834,7 @@  functions to the next and/or previous version.")
      `(#:test-target "."
        #:package "ppx_tools_versioned"))
     (propagated-inputs
-     `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
+     `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)))
     (properties `((upstream-name . "ppx_tools_versioned")))
     (home-page "https://github.com/let-def/ppx_tools_versioned")
     (synopsis "Variant of ppx_tools")
@@ -6121,7 +6140,7 @@  combinators.")
          "0900vli5kw7s5kdam0n4cqsfsfqb7mdb3azn3i55595gilg1vyn8"))))
     (build-system dune-build-system)
     (propagated-inputs
-     `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+     `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)
        ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
        ("ocaml-ounit" ,ocaml-ounit)))
     (arguments
@@ -6360,7 +6379,7 @@  variants.")
        ("ocaml-cmdliner" ,ocaml-cmdliner)
        ("ocaml-re" ,ocaml-re)
        ("ocaml-result" ,ocaml-result)
-       ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+       ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)
        ("ocaml-odoc" ,ocaml-odoc)
        ("ocaml-version" ,ocaml-version)))
     (native-inputs