[bug#77290] gnu: Add emacs-rescript-mode

Message ID 3a21ded4879d324ee6c86b33542eb71765aad081.1743009283.git.vasilii.smirnov@mailbox.org
State New
Headers
Series [bug#77290] gnu: Add emacs-rescript-mode |

Commit Message

King, Spencer via Guix-patches" via March 26, 2025, 5:15 p.m. UTC
  From: Vasilii Smirnov <vasilii.smirnov@mailbox.org>

* gnu/packages/emacs-xyz.scm (emacs-rescript-mode): New variable.

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


base-commit: a9239a769c5611f12061c9a895e4e218b3445e2f
  

Comments

Cayetano Santos March 28, 2025, 10:14 a.m. UTC | #1
Thanks for the patch !

Looks good to me, except for the tests, present in the repo.

Could you please activate testing of explicitly disable it for good
reason, to comply with upcoming default behaviour in emacs packages ?
  
Ian Eure March 29, 2025, 3:13 p.m. UTC | #2
Hi Vasilii,

vasilii.smirnov@mailbox.org writes:

> From: Vasilii Smirnov <vasilii.smirnov@mailbox.org>
>
> * gnu/packages/emacs-xyz.scm (emacs-rescript-mode): New 
> variable.
>
> Change-Id: I52fa3e2693f62aa25ec2d97441bc3f191d46ac0b
> ---
>  gnu/packages/emacs-xyz.scm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm 
> b/gnu/packages/emacs-xyz.scm
> index da30b4776c..2735527fac 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -3772,6 +3772,33 @@ (define-public emacs-reformatter
>  optional minor mode which can apply this command automatically 
>  on save.")
>      (license license:gpl3+)))
>  
> +(define-public emacs-rescript-mode
> +  (let ((commit "b9dda43cc52cd4a9b384c59fb0cc7a11f0bad230")
> +        (revision "0"))
> +    (package
> +      (name "emacs-rescript-mode")
> +      (version (git-version "0.0.0" revision commit))

rescript-mode.el declares a version of 0.1.0, please use that 
instead of 0.0.0.

When you resend the patch, please make sure to send it as version 
2 -- your second patch was sent as version 1, but version 1 is 
implied for patches which don’t declare a version, and multiple 
patches with the same version can be hard to apply.

Thanks,

  -- Ian
  
Vasilii Smirnov March 29, 2025, 6:23 p.m. UTC | #3
On 3/29/25 16:13, Ian Eure wrote:
> rescript-mode.el declares a version of 0.1.0, please use that instead of
> 0.0.0.

Thanks, I didn't notice the version in the comments. Although, it's been
at "0.1.0" from like the second commit...

> When you resend the patch, please make sure to send it as version 2 --
> your second patch was sent as version 1, but version 1 is implied for
> patches which don’t declare a version, and multiple patches with the
> same version can be hard to apply.

Damn, I always forget where to start from 0 and where from 1. Sorry.
  
Ian Eure March 29, 2025, 7:08 p.m. UTC | #4
Hi Vasilii,

Vasilii Smirnov <vasilii.smirnov@mailbox.org> writes:

> On 3/29/25 16:13, Ian Eure wrote:
>> rescript-mode.el declares a version of 0.1.0, please use that 
>> instead of
>> 0.0.0.
>
> Thanks, I didn't notice the version in the comments. Although, 
> it's been
> at "0.1.0" from like the second commit...
>
>> When you resend the patch, please make sure to send it as 
>> version 2 --
>> your second patch was sent as version 1, but version 1 is 
>> implied for
>> patches which don’t declare a version, and multiple patches 
>> with the
>> same version can be hard to apply.
>
> Damn, I always forget where to start from 0 and where from 
> 1. Sorry.

Thanks for the quick turnaround.  Pushed as d219e38a41.

 -- Ian
  

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index da30b4776c..8133654138 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3772,6 +3772,27 @@  (define-public emacs-reformatter
 optional minor mode which can apply this command automatically on save.")
     (license license:gpl3+)))
 
+(define-public emacs-rescript-mode
+  (let ((commit "b9dda43cc52cd4a9b384c59fb0cc7a11f0bad230")
+        (revision "0"))
+    (package
+      (name "emacs-rescript-mode")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jjlee/rescript-mode")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "00pjn683zl5rcmwf86gs4ikxzz82d3rpmicpxhgy2m2xyrfxpz89"))
+                (file-name (git-file-name name version))))
+      (build-system emacs-build-system)
+      (home-page "https://github.com/jjlee/rescript-mode")
+      (synopsis "Major mode for editing ReScript")
+      (description "This package provides a major mode for editing ReScript source code.")
+      (license license:gpl3))))
+
 (define-public emacs-language-id
   (package
     (name "emacs-language-id")