GNU bug report logs - #71239
[PATCH] gnu: Add emacs-dape.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Tue, 28 May 2024 10:00:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 71239 in the body.
You can then email your comments to 71239 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#71239; Package guix-patches. (Tue, 28 May 2024 10:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 28 May 2024 10:00:03 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] gnu: Add emacs-dape.
Date: Tue, 28 May 2024 11:57:57 +0200
* gnu/packages/emacs-xyz.scm (emacs-dape): New variable.

Change-Id: Ia07745dd47b2e1e5b85654a5b4b2400dd4c4cc13
---
 gnu/packages/emacs-xyz.scm | 52 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 1c890a5b008..9f93d582f3f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -31088,6 +31088,58 @@ (define-public emacs-lsp-docker
 in Docker environment.")
       (license license:gpl3+))))
 
+(define-public emacs-dape
+  (let ((commit "51fad7df7473778fbc4bac703317de7f7713b307")
+        (revision "0"))
+    (package
+      (name "emacs-dape")
+      (version (git-version "0.12.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/svaante/dape")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1jics02b9fxjs0lykiv7z924z18id550mqhf6piqzv0sgan91pg2"))))
+      (build-system emacs-build-system)
+      (arguments
+       ;; FIXME python tests pass, JS tests require additional dependencies
+       ;; See https://lists.sr.ht/~abcdw/rde-devel/patches/51878
+       (list #:tests? #f
+             #:test-command #~'("emacs" "--batch" "-l" "dape.el"
+                                "-l" "dape-tests.el"
+                                "-f" "ert-run-tests-batch-and-exit")
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-after 'unpack 'support-unwrapped-python
+                   (lambda _
+                     (substitute* "dape.el"
+                       (("command \"python\"")
+                        "command \"python3\""))))
+                 (add-before 'check 'pre-check
+                   (lambda* (#:key tests? inputs #:allow-other-keys)
+                     (if tests?
+                         (setenv
+                          "PATH"
+                          (string-append
+                           (getenv "PATH")
+                           ":" (dirname (search-input-file inputs "/bin/python3"))
+                           ":" (dirname (search-input-file inputs "/bin/node"))))
+                         (format #t "test suite not run~%")))))))
+      (native-inputs (list node-lts python-minimal python-debugpy))
+      (propagated-inputs (list emacs-jsonrpc))
+      (home-page "https://github.com/svaante/dape")
+      (synopsis "Debug Adapter Protocol for Emacs")
+      (description
+       "Dape is a debug adapter client for Emacs.  The debug adapter protocol,
+much like its more well-known counterpart, the language server protocol,
+aims to establish a common API for programming tools.  However, instead of
+functionalities such as code completions, it provides a standardized
+interface for debuggers.")
+      (license license:gpl3+))))
+
 (define-public emacs-dap-mode
   (package
     (name "emacs-dap-mode")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Sun, 09 Jun 2024 20:54:02 GMT) Full text and rfc822 format available.

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

From: Jelle Licht <jlicht <at> fsfe.org>
To: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>,
 71239 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: Re: [bug#71239] [PATCH] gnu: Add emacs-dape.
Date: Sun, 09 Jun 2024 22:52:32 +0200
Hi Nicolas,

I've got some nitpicks, and one question as the package does not seem to
run for me, which could very well be an issue on my end.

Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/emacs-xyz.scm (emacs-dape): New variable.
>
> Change-Id: Ia07745dd47b2e1e5b85654a5b4b2400dd4c4cc13
> ---
>  gnu/packages/emacs-xyz.scm | 52 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 1c890a5b008..9f93d582f3f 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -31088,6 +31088,58 @@ (define-public emacs-lsp-docker
>  in Docker environment.")
>        (license license:gpl3+))))
>  
> +(define-public emacs-dape
> +  (let ((commit "51fad7df7473778fbc4bac703317de7f7713b307")
> +        (revision "0"))
> +    (package
> +      (name "emacs-dape")
> +      (version (git-version "0.12.0" revision commit))
Is there a particular reason not to stick to the 'proper' releases? 
If so, could you add a comment explaining why?

> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/svaante/dape")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "1jics02b9fxjs0lykiv7z924z18id550mqhf6piqzv0sgan91pg2"))))
> +      (build-system emacs-build-system)
> +      (arguments
> +       ;; FIXME python tests pass, JS tests require additional dependencies
> +       ;; See https://lists.sr.ht/~abcdw/rde-devel/patches/51878
> +       (list #:tests? #f
Can't we patch out or disable the JS tests, instead of not running any tests?

> +             #:test-command #~'("emacs" "--batch" "-l" "dape.el"
> +                                "-l" "dape-tests.el"
> +                                "-f" "ert-run-tests-batch-and-exit")
> +             #:phases
> +             #~(modify-phases %standard-phases
> +                 (add-after 'unpack 'support-unwrapped-python
> +                   (lambda _
> +                     (substitute* "dape.el"
> +                       (("command \"python\"")
> +                        "command \"python3\""))))

I don't think we do this kind of patching for other packages, but I
could be mistaken of course. If this was needed to get the python tests
to succeed, maybe it could also work with python-minimal-wrapper instead
of patching.

> +                 (add-before 'check 'pre-check
> +                   (lambda* (#:key tests? inputs #:allow-other-keys)
> +                     (if tests?
> +                         (setenv
> +                          "PATH"
> +                          (string-append
> +                           (getenv "PATH")
> +                           ":" (dirname (search-input-file inputs "/bin/python3"))
> +                           ":" (dirname (search-input-file inputs "/bin/node"))))

Ditto wrt my earlier remark about the JS tests.

> +                         (format #t "test suite not run~%")))))))
> +      (native-inputs (list node-lts python-minimal python-debugpy))
> +      (propagated-inputs (list emacs-jsonrpc))

Did running this package once installed actually work on your local
setup?  If so, I'd love to know how you are running this package, as I'm
running into the issue as the one I reported at
https://issues.guix.gnu.org/71065

> +      (home-page "https://github.com/svaante/dape")
> +      (synopsis "Debug Adapter Protocol for Emacs")
> +      (description
> +       "Dape is a debug adapter client for Emacs.  The debug adapter protocol,
> +much like its more well-known counterpart, the language server protocol,
> +aims to establish a common API for programming tools.  However, instead of
> +functionalities such as code completions, it provides a standardized
> +interface for debuggers.")
> +      (license license:gpl3+))))
> +
>  (define-public emacs-dap-mode
>    (package
>      (name "emacs-dap-mode")
> -- 
> 2.41.0


Thanks for the package,
 - Jelle




Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Sun, 09 Jun 2024 21:05:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Mon, 10 Jun 2024 07:56:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Jelle Licht <jlicht <at> fsfe.org>, Nicolas Graves via Guix-patches via
 <guix-patches <at> gnu.org>, 71239 <at> debbugs.gnu.org
Subject: Re: [bug#71239] [PATCH] gnu: Add emacs-dape.
Date: Mon, 10 Jun 2024 09:50:28 +0200
On 2024-06-09 22:52, Jelle Licht wrote:

> Hi Nicolas,
>
> I've got some nitpicks, and one question as the package does not seem to
> run for me, which could very well be an issue on my end.
>
>> +      (name "emacs-dape")
>> +      (version (git-version "0.12.0" revision commit))
> Is there a particular reason not to stick to the 'proper' releases? 
> If so, could you add a comment explaining why?

There are no upstream tags, this is simply the commit of the tag,
IIRC. So it's the proper release. Maybe I should simply put the version
here and use git-version in the origin field instead ?

>> +      (arguments
>> +       ;; FIXME python tests pass, JS tests require additional dependencies
>> +       ;; See https://lists.sr.ht/~abcdw/rde-devel/patches/51878
>> +       (list #:tests? #f
> Can't we patch out or disable the JS tests, instead of not running any
> tests?

Doable, although using I'm not sure there's a light approach for this
rather than patching half the file, which I think is not worth it. Will
investigate. 

>> +             #:test-command #~'("emacs" "--batch" "-l" "dape.el"
>> +                                "-l" "dape-tests.el"
>> +                                "-f" "ert-run-tests-batch-and-exit")
>> +             #:phases
>> +             #~(modify-phases %standard-phases
>> +                 (add-after 'unpack 'support-unwrapped-python
>> +                   (lambda _
>> +                     (substitute* "dape.el"
>> +                       (("command \"python\"")
>> +                        "command \"python3\""))))
>
> I don't think we do this kind of patching for other packages, but I
> could be mistaken of course. If this was needed to get the python tests
> to succeed, maybe it could also work with python-minimal-wrapper instead
> of patching.

Since python is not propagated, this would mean that we expect the user
to have python-wrapper instead of python, I'm not sure we want to
enforce that because it might cause users to have to debug this. We
can of course propagate python-wrapper instead, but then we increase the
closure size.

>> +                         (format #t "test suite not run~%")))))))
>> +      (native-inputs (list node-lts python-minimal python-debugpy))
>> +      (propagated-inputs (list emacs-jsonrpc))
>
> Did running this package once installed actually work on your local
> setup?  If so, I'd love to know how you are running this package, as I'm
> running into the issue as the one I reported at
> https://issues.guix.gnu.org/71065

No, actually I couldn't, but I didn't settled for a stable
configuration, I wanted to send that to RDE, but haven't done it
yet.

> Thanks for the package,
>  - Jelle

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Mon, 10 Jun 2024 07:57:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Jelle Licht <jlicht <at> fsfe.org>, Nicolas Graves via Guix-patches via
 <guix-patches <at> gnu.org>, 71239 <at> debbugs.gnu.org
Subject: Re: [bug#71239] [PATCH] gnu: Add emacs-dape.
Date: Mon, 10 Jun 2024 09:56:33 +0200
On 2024-06-09 22:52, Jelle Licht wrote:

> Hi Nicolas,
>
> I've got some nitpicks, and one question as the package does not seem to
> run for me, which could very well be an issue on my end.

Ow I probably have forgotten to block the patch, but it depends on
emacs-jsonrpc <at> 0.25, which is not the current version in Guix.

I've sent a patch in 70998. Although I understand now that updating
native emacs packages is not that simple - I've seen a mail thread about
this.
>
> Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org> writes:
>
>> * gnu/packages/emacs-xyz.scm (emacs-dape): New variable.
>>
>> Change-Id: Ia07745dd47b2e1e5b85654a5b4b2400dd4c4cc13
>> ---
>>  gnu/packages/emacs-xyz.scm | 52 ++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 52 insertions(+)
>>
>> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
>> index 1c890a5b008..9f93d582f3f 100644
>> --- a/gnu/packages/emacs-xyz.scm
>> +++ b/gnu/packages/emacs-xyz.scm
>> @@ -31088,6 +31088,58 @@ (define-public emacs-lsp-docker
>>  in Docker environment.")
>>        (license license:gpl3+))))
>>  
>> +(define-public emacs-dape
>> +  (let ((commit "51fad7df7473778fbc4bac703317de7f7713b307")
>> +        (revision "0"))
>> +    (package
>> +      (name "emacs-dape")
>> +      (version (git-version "0.12.0" revision commit))
> Is there a particular reason not to stick to the 'proper' releases? 
> If so, could you add a comment explaining why?
>
>> +      (source
>> +       (origin
>> +         (method git-fetch)
>> +         (uri (git-reference
>> +               (url "https://github.com/svaante/dape")
>> +               (commit commit)))
>> +         (file-name (git-file-name name version))
>> +         (sha256
>> +          (base32 "1jics02b9fxjs0lykiv7z924z18id550mqhf6piqzv0sgan91pg2"))))
>> +      (build-system emacs-build-system)
>> +      (arguments
>> +       ;; FIXME python tests pass, JS tests require additional dependencies
>> +       ;; See https://lists.sr.ht/~abcdw/rde-devel/patches/51878
>> +       (list #:tests? #f
> Can't we patch out or disable the JS tests, instead of not running any tests?
>
>> +             #:test-command #~'("emacs" "--batch" "-l" "dape.el"
>> +                                "-l" "dape-tests.el"
>> +                                "-f" "ert-run-tests-batch-and-exit")
>> +             #:phases
>> +             #~(modify-phases %standard-phases
>> +                 (add-after 'unpack 'support-unwrapped-python
>> +                   (lambda _
>> +                     (substitute* "dape.el"
>> +                       (("command \"python\"")
>> +                        "command \"python3\""))))
>
> I don't think we do this kind of patching for other packages, but I
> could be mistaken of course. If this was needed to get the python tests
> to succeed, maybe it could also work with python-minimal-wrapper instead
> of patching.
>
>> +                 (add-before 'check 'pre-check
>> +                   (lambda* (#:key tests? inputs #:allow-other-keys)
>> +                     (if tests?
>> +                         (setenv
>> +                          "PATH"
>> +                          (string-append
>> +                           (getenv "PATH")
>> +                           ":" (dirname (search-input-file inputs "/bin/python3"))
>> +                           ":" (dirname (search-input-file inputs "/bin/node"))))
>
> Ditto wrt my earlier remark about the JS tests.
>
>> +                         (format #t "test suite not run~%")))))))
>> +      (native-inputs (list node-lts python-minimal python-debugpy))
>> +      (propagated-inputs (list emacs-jsonrpc))
>
> Did running this package once installed actually work on your local
> setup?  If so, I'd love to know how you are running this package, as I'm
> running into the issue as the one I reported at
> https://issues.guix.gnu.org/71065
>
>> +      (home-page "https://github.com/svaante/dape")
>> +      (synopsis "Debug Adapter Protocol for Emacs")
>> +      (description
>> +       "Dape is a debug adapter client for Emacs.  The debug adapter protocol,
>> +much like its more well-known counterpart, the language server protocol,
>> +aims to establish a common API for programming tools.  However, instead of
>> +functionalities such as code completions, it provides a standardized
>> +interface for debuggers.")
>> +      (license license:gpl3+))))
>> +
>>  (define-public emacs-dap-mode
>>    (package
>>      (name "emacs-dap-mode")
>> -- 
>> 2.41.0
>
>
> Thanks for the package,
>  - Jelle

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Mon, 10 Jun 2024 08:09:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Mon, 10 Jun 2024 08:11:02 GMT) Full text and rfc822 format available.

Added blocking bug(s) 70998 Request was from Nicolas Graves <ngraves <at> ngraves.fr> to control <at> debbugs.gnu.org. (Mon, 10 Jun 2024 08:11:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#71239; Package guix-patches. (Wed, 19 Jun 2024 08:00:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>
Cc: Nicolas Graves <ngraves <at> ngraves.fr>, 71239-done <at> debbugs.gnu.org
Subject: Re: [bug#71239] [PATCH] gnu: Add emacs-dape.
Date: Wed, 19 Jun 2024 09:58:58 +0200
Hello,

Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/emacs-xyz.scm (emacs-dape): New variable.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou






Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Wed, 19 Jun 2024 08:00:03 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Wed, 19 Jun 2024 08:00:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Jul 2024 11:24:08 GMT) Full text and rfc822 format available.

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

Previous Next


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