GNU bug report logs - #34412
[PATCH] gnu: ocaml-merlin: Added tests

Previous Next

Package: guix-patches;

Reported by: Gabriel Hondet <gabrielhondet <at> gmail.com>

Date: Sun, 10 Feb 2019 13:41:01 UTC

Severity: normal

Tags: patch

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34412 in the body.
You can then email your comments to 34412 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Sun, 10 Feb 2019 13:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel Hondet <gabrielhondet <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 10 Feb 2019 13:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Hondet <gabrielhondet <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: ocaml-merlin: Added tests
Date: Sun, 10 Feb 2019 14:36:15 +0100
[Message part 1 (text/plain, inline)]
* gnu/packages/ocaml.scm (ocaml-merlin): Added tests
---
 gnu/packages/ocaml.scm | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 07fcf92ae..0b33c257a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -66,6 +66,7 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages web-browsers)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system dune)
@@ -4785,6 +4786,11 @@ format}.  @code{craml} is released as a single binary (called @code{craml}).")
              (url "https://github.com/ocaml/merlin.git")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; fix a dune file calling missing dependencies
+                   (substitute* "tests/locate/partial-cmt/dune"
+                     (("a.ml a.mli") ""))))
        (sha256
         (base32
          "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
@@ -4794,9 +4800,22 @@ format}.  @code{craml} is released as a single binary (called @code{craml}).")
        ("ocaml-yojson" ,ocaml-yojson)
        ("ocaml-easy-format" ,ocaml-easy-format)))
     (native-inputs
-     `(("ocaml-findlib" ,ocaml-findlib)))
+     `(("ocaml-findlib" ,ocaml-findlib)
+       ("ocaml-craml" ,ocaml-craml)
+       ("jq" ,jq)))
     (arguments
-     '(#:tests? #f)) ;; Errors in tests in version 3.2.2
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'remove-failing
+           (lambda _
+             (delete-file-recursively "tests/warnings/")
+             (delete-file-recursively ;fail because of shebang patching
+              "tests/locate/context-detection/")
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "make" "test")
+             #t)))))
     (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
     (description "Merlin is an editor service that provides modern IDE
 features for OCaml.  Emacs and Vim support is provided out-of-the-box.
-- 
2.20.1
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Fri, 28 Jun 2019 05:42:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: swedebugia <swedebugia <at> riseup.net>
To: guix-patches <at> gnu.org
Subject: Re: [bug#34412] [PATCH] gnu: ocaml-merlin: Added tests
Date: Fri, 28 Jun 2019 07:41:38 +0200
On 2019-02-10 14:36, Gabriel Hondet wrote:
> * gnu/packages/ocaml.scm (ocaml-merlin): Added tests
> ---
>   gnu/packages/ocaml.scm | 23 +++++++++++++++++++++--
>   1 file changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 07fcf92ae..0b33c257a 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -66,6 +66,7 @@
>     #:use-module (gnu packages version-control)
>     #:use-module (gnu packages virtualization)
>     #:use-module (gnu packages web-browsers)
> +  #:use-module (gnu packages web)
>     #:use-module (gnu packages xml)
>     #:use-module (gnu packages xorg)
>     #:use-module (guix build-system dune)
> @@ -4785,6 +4786,11 @@ format}.  @code{craml} is released as a single binary (called @code{craml}).")
>                (url"https://github.com/ocaml/merlin.git")
>                (commit (string-append "v" version))))
>          (file-name (git-file-name name version))
> +       (modules '((guix build utils)))
> +       (snippet '(begin
> +                   ;; fix a dune file calling missing dependencies
> +                   (substitute* "tests/locate/partial-cmt/dune"
> +                     (("a.ml a.mli") ""))))
>          (sha256
>           (base32
>            "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
> @@ -4794,9 +4800,22 @@ format}.  @code{craml} is released as a single binary (called @code{craml}).")
>          ("ocaml-yojson" ,ocaml-yojson)
>          ("ocaml-easy-format" ,ocaml-easy-format)))
>       (native-inputs
> -     `(("ocaml-findlib" ,ocaml-findlib)))
> +     `(("ocaml-findlib" ,ocaml-findlib)
> +       ("ocaml-craml" ,ocaml-craml)
> +       ("jq" ,jq)))
>       (arguments
> -     '(#:tests? #f)) ;; Errors in tests in version 3.2.2
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'check 'remove-failing
> +           (lambda _
> +             (delete-file-recursively "tests/warnings/")
> +             (delete-file-recursively ;fail because of shebang patching
> +              "tests/locate/context-detection/")
> +             #t))
> +         (replace 'check
> +           (lambda _
> +             (invoke "make" "test")
> +             #t)))))
>       (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
>       (description "Merlin is an editor service that provides modern IDE
>   features for OCaml.  Emacs and Vim support is provided out-of-the-box.
> -- 2.20.1
> 

This has slipped through the cracks. Could you rebase to current master 
and send an updated patch?

-- 
Cheers Swedebugia




Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Fri, 28 Jun 2019 06:19:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: guix-patches <at> gnu.org, swedebugia <swedebugia <at> riseup.net>,
 34412 <at> debbugs.gnu.org
Subject: Re: [bug#34412] [PATCH] gnu: ocaml-merlin: Added tests
Date: Fri, 28 Jun 2019 08:17:54 +0200
Sorry for not having seen that!

Le 28 juin 2019 07:41:38 GMT+02:00, swedebugia <swedebugia <at> riseup.net> a écrit :
>On 2019-02-10 14:36, Gabriel Hondet wrote:
>> * gnu/packages/ocaml.scm (ocaml-merlin): Added tests
>> ---
>>   gnu/packages/ocaml.scm | 23 +++++++++++++++++++++--
>>   1 file changed, 21 insertions(+), 2 deletions(-)
>> 
>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>> index 07fcf92ae..0b33c257a 100644
>> --- a/gnu/packages/ocaml.scm
>> +++ b/gnu/packages/ocaml.scm
>> @@ -66,6 +66,7 @@
>>     #:use-module (gnu packages version-control)
>>     #:use-module (gnu packages virtualization)
>>     #:use-module (gnu packages web-browsers)
>> +  #:use-module (gnu packages web)
>>     #:use-module (gnu packages xml)
>>     #:use-module (gnu packages xorg)
>>     #:use-module (guix build-system dune)
>> @@ -4785,6 +4786,11 @@ format}.  @code{craml} is released as a single
>binary (called @code{craml}).")
>>                (url"https://github.com/ocaml/merlin.git")
>>                (commit (string-append "v" version))))
>>          (file-name (git-file-name name version))
>> +       (modules '((guix build utils)))
>> +       (snippet '(begin
>> +                   ;; fix a dune file calling missing dependencies
>> +                   (substitute* "tests/locate/partial-cmt/dune"
>> +                     (("a.ml a.mli") ""))))
>>          (sha256
>>           (base32
>>            "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
>> @@ -4794,9 +4800,22 @@ format}.  @code{craml} is released as a single
>binary (called @code{craml}).")
>>          ("ocaml-yojson" ,ocaml-yojson)
>>          ("ocaml-easy-format" ,ocaml-easy-format)))
>>       (native-inputs
>> -     `(("ocaml-findlib" ,ocaml-findlib)))
>> +     `(("ocaml-findlib" ,ocaml-findlib)
>> +       ("ocaml-craml" ,ocaml-craml)
>> +       ("jq" ,jq)))
>>       (arguments
>> -     '(#:tests? #f)) ;; Errors in tests in version 3.2.2
>> +     '(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-before 'check 'remove-failing
>> +           (lambda _
>> +             (delete-file-recursively "tests/warnings/")
>> +             (delete-file-recursively ;fail because of shebang
>patching
>> +              "tests/locate/context-detection/")

Can we try and fix the shebang then?

>> +             #t))
>> +         (replace 'check
>> +           (lambda _
>> +             (invoke "make" "test")
>> +             #t)))))

I think #:test-target "test" would be enough, no?

>>       (synopsis "Context sensitive completion for OCaml in Vim and
>Emacs")
>>       (description "Merlin is an editor service that provides modern
>IDE
>>   features for OCaml.  Emacs and Vim support is provided
>out-of-the-box.
>> -- 2.20.1
>> 
>
>This has slipped through the cracks. Could you rebase to current master
>
>and send an updated patch?





Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Fri, 28 Jun 2019 06:19:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Mon, 28 Dec 2020 12:42:02 GMT) Full text and rfc822 format available.

Message #17 received at 34412 <at> debbugs.gnu.org (full text, mbox):

From: pukkamustard <pukkamustard <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: pukkamustard <pukkamustard <at> posteo.net>, 34412 <at> debbugs.gnu.org
Subject: [PATCH 00/12] Add ocaml-merlin.
Date: Mon, 28 Dec 2020 13:40:17 +0100
Hi Guix,

This adds ocaml-merlin, a development tool for OCaml (and dependencies).

Some notes and questions:

- ocaml4.07-merlin is already available (version 3.2.2). This version has not
  been updated (but changed to inherit from ocaml-merlin).

- There are many ocaml4.07-* packages in Guix. The reason for this is that
  some packages need to be built with OCaml 4.07 but some newer versions of
  libraries do no longer support OCaml 4.07 (or the old version of dune),
  requiring older versions of the same packages. See also commit message
  9ada1555.

  This is quite cumbersome as two trees of OCaml packages need to be
  maintained.

  A nice solution would be to upgrade packages requiring OCaml 4.07 to also
  build with the default OCaml (4.11). Packages that are not dependencies of
  other packages that require OCaml 4.07 seem to be: `bap`, `ocaml-earley` and
  `pplacer`. Maybe this should be opened as an issue?

- Some OCaml libraries have dependencies in `inputs` that seem to be required
  from packages using the libraries.  E.g. `ocaml-yojson` depends on
  `ocaml-biniou`. Packages depending on `ocaml-yojson` need to manually add
  `ocaml-biniou` to their inputs. Would it work/make sense to add
  `ocaml-biniou` to `propagated-inputs` of `ocaml-yojson`?

- Test for ocaml-merlin (version 3.4.2) work. This resolves issue #34412
  (alltough ocaml4.07-merlin still can not run tests).

Thanks!
-pukkamustard

pukkamustard (12):
  gnu: Remove ocaml-js-build-tools.
  gnu: Add ocaml-sexplib.
  gnu: Add ocaml-base.
  gnu: Add ocaml-parsexp.
  gnu: Add ocaml-sexplib.
  gnu: Add ocaml-ounit2.
  gnu: ocaml-tyxml: Update to 4.4.0.
  gnu: ocaml-markup: Update to 1.0.0.
  gnu: Add ocaml-odoc.
  gnu: Add ocaml-version.
  gnu: Add ocaml-mdx.
  gnu: Add ocaml-merlin.

 gnu/packages/ocaml.scm | 527 ++++++++++++++++++++++++++++-------------
 1 file changed, 359 insertions(+), 168 deletions(-)

-- 
2.29.2





Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Mon, 28 Dec 2020 14:08:01 GMT) Full text and rfc822 format available.

Message #20 received at 34412 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: pukkamustard <pukkamustard <at> posteo.net>
Cc: 45498 <at> debbugs.gnu.org, 34412 <at> debbugs.gnu.org
Subject: Re: [bug#45498] [PATCH 00/12] Add ocaml-merlin.
Date: Mon, 28 Dec 2020 15:06:55 +0100
Le Mon, 28 Dec 2020 13:40:17 +0100,
pukkamustard <pukkamustard <at> posteo.net> a écrit :

> Hi Guix,
> 
> This adds ocaml-merlin, a development tool for OCaml (and
> dependencies).

Thanks for the patches!

> 
> Some notes and questions:
> 
> - ocaml4.07-merlin is already available (version 3.2.2). This version
> has not been updated (but changed to inherit from ocaml-merlin).
> 
> - There are many ocaml4.07-* packages in Guix. The reason for this is
> that some packages need to be built with OCaml 4.07 but some newer
> versions of libraries do no longer support OCaml 4.07 (or the old
> version of dune), requiring older versions of the same packages. See
> also commit message 9ada1555.

Have you tried updating dune to the latest version that builds with
ocaml 4.07?

> 
>   This is quite cumbersome as two trees of OCaml packages need to be
>   maintained.

Actually 3, there are ocaml 4.07, 4.09 and 4.11 currently. I'm working
on a bootstrap for ocaml 4.07 (ocaml builds from a binary version of
itself), so I don't think it'll disappear soon, but at least we can try
and make ocaml4.07-* packages disappear :)

> 
>   A nice solution would be to upgrade packages requiring OCaml 4.07
> to also build with the default OCaml (4.11). Packages that are not
> dependencies of other packages that require OCaml 4.07 seem to be:
> `bap`, `ocaml-earley` and `pplacer`. Maybe this should be opened as
> an issue?

pretty sure they build with at least ocaml-4.09 now, I'll see what I
can do :)

> 
> - Some OCaml libraries have dependencies in `inputs` that seem to be
> required from packages using the libraries.  E.g. `ocaml-yojson`
> depends on `ocaml-biniou`. Packages depending on `ocaml-yojson` need
> to manually add `ocaml-biniou` to their inputs. Would it work/make
> sense to add `ocaml-biniou` to `propagated-inputs` of `ocaml-yojson`?

Yeah, could you provide an additional patch for that?

> 
> - Test for ocaml-merlin (version 3.4.2) work. This resolves issue
> #34412 (alltough ocaml4.07-merlin still can not run tests).
> 
> Thanks!
> -pukkamustard

Thank you! I've sent some remarks to your patches, but generally LGTM :)

> 
> pukkamustard (12):
>   gnu: Remove ocaml-js-build-tools.
>   gnu: Add ocaml-sexplib.
>   gnu: Add ocaml-base.
>   gnu: Add ocaml-parsexp.
>   gnu: Add ocaml-sexplib.
>   gnu: Add ocaml-ounit2.
>   gnu: ocaml-tyxml: Update to 4.4.0.
>   gnu: ocaml-markup: Update to 1.0.0.
>   gnu: Add ocaml-odoc.
>   gnu: Add ocaml-version.
>   gnu: Add ocaml-mdx.
>   gnu: Add ocaml-merlin.
> 
>  gnu/packages/ocaml.scm | 527
> ++++++++++++++++++++++++++++------------- 1 file changed, 359
> insertions(+), 168 deletions(-)
> 




Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Fri, 08 Oct 2021 02:58:01 GMT) Full text and rfc822 format available.

Message #23 received at 34412 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 34412 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: ocaml-merlin: Added tests
Date: Fri, 8 Oct 2021 04:57:16 +0200
Hi!

So, since we have ocaml-merlin now, and since ocaml4.07-merlin is not
required by any other package, should we get rid of it? Or do we still
have a use for it?




Information forwarded to guix-patches <at> gnu.org:
bug#34412; Package guix-patches. (Mon, 11 Oct 2021 11:36:02 GMT) Full text and rfc822 format available.

Message #26 received at 34412 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 34412 <at> debbugs.gnu.org
Subject: Re: [bug#34412] [PATCH] gnu: ocaml-merlin: Added tests
Date: Mon, 11 Oct 2021 13:35:32 +0200
Hi Julien

What is the plan for removing ocaml4.07 packages?

BTW, this patch submission could be closed, IMHO.  Because as you
said, ocaml-merlin is in and ocaml4.07-merlin is not required by any
other package.

Cheers,
simon




Reply sent to zimoun <zimon.toutoune <at> gmail.com>:
You have taken responsibility. (Thu, 07 Apr 2022 12:17:02 GMT) Full text and rfc822 format available.

Notification sent to Gabriel Hondet <gabrielhondet <at> gmail.com>:
bug acknowledged by developer. (Thu, 07 Apr 2022 12:17:03 GMT) Full text and rfc822 format available.

Message #31 received at 34412-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Gabriel Hondet <gabrielhondet <at> gmail.com>
Cc: 34412-done <at> debbugs.gnu.org
Subject: Re: bug#34412: [PATCH] gnu: ocaml-merlin: Added tests
Date: Thu, 07 Apr 2022 14:14:28 +0200
Hi,

Thanks for your contribution with patch#34412 [1].  The ’ocaml-merlin’
contains this:

--8<---------------cut here---------------start------------->8---
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
--8<---------------cut here---------------end--------------->8---

added by 980c33bd3f16e44a123ef21408a56e59ebb76373.  And the package
’ocaml4.07-merlin’ had been removed by
188e3e2e6878346b0bdc8b46084f458abe86826c.

Therefore, closing.


Cheers,
simon


1: <http://issues.guix.gnu.org/issue/34412>




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 06 May 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.