Subject: [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1

From: zimoun <[email-masked]>
Date: Mon, 19 Oct 2020 16:24:23 +0200

On Mon, 19 Oct 2020 at 16:11, Julien Lepiller <[email-masked]> wrote:

> >> +(define-public ocaml4.09-csexp
> >> +  (package
> >> +    (inherit ocaml-csexp)
> >> +    (name "ocaml4.09-csexp")
> >> +    (arguments
> >> +     `(#:ocaml ,ocaml-4.09
> >> +       #:findlib ,ocaml4.09-findlib
> >> +       ,@(substitute-keyword-arguments (package-arguments
> >ocaml-csexp)
> >> +           ((#:dune _) (package-with-ocaml4.09 dune-bootstrap)))))
> >> +    (propagated-inputs
> >> +     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))
> >
> >You do not use the one you define below.  Why?  Other said, do you
> >really need 'ocaml4.09.result' defined below?
>
> Actually, the properties ensure that I actually use the one below :)

I am not sure.  You are recreating a package based on 'ocaml-result'
and not using the package 'ocaml4.09-result'.  Or I miss something
about the symbols.

> >> +(define-public ocaml4.09-result
> >> +  (package
> >> +    (inherit ocaml-result)
> >> +    (arguments
> >> +     `(#:test-target "."
> >> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
> >> +       #:ocaml ,ocaml-4.09
> >> +       #:findlib ,ocaml4.09-findlib))))
> >
> >Since the name is not changed after inheritance, this package is
> >ambiguous.  And possibly do not compile.
>
> Ah right, thanks!

Moreover, my point is: you are using

 once:
    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
and once:
     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))

and it seems easier to only use one form.  Other said, maybe you do
not need the new 'ocaml4.09-result' and '(package-with-ocaml4.09
ocaml-result)' is enough.

> >> -     `(#:phases
> >> +     `(#:tests? #f; no tests
> >
> >Why?  Because the tests are run during the build?  If yes, does it make
> >sense to move the comment there?
>
> No, the comment might have come from a previous version or just copied by mistake. There is really no test in this package (unless there's something weird going on with oasis scripts).

Maybe reword the comment: "no test provided by the package"or
something like that.

All the best,
simon