unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#40301] [PATCH] gnu: Add emacs-psc-ide.
@ 2020-03-29  1:11 John Soo
  2020-04-11 16:21 ` [bug#40301] [PATCH] Fixed some issues with the patches John Soo
  0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-03-29  1:11 UTC (permalink / raw)
  To: 40301

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

Hi Guix,

psd-ide is an indispensable part of my PureScript workflow.

Thanks!

John


[-- Attachment #2: add emacs-psc-ide --]
[-- Type: text/x-patch, Size: 2314 bytes --]

>From c2001d000ffa61a4d2ae18e1f7db9b0c57923197 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 24 Mar 2020 07:36:28 -0700
Subject: [PATCH] gnu: Add emacs-psc-ide.

* gnu/packages/emacs-xyz.scm (emacs-psc-ide): New variable.
---
 gnu/packages/emacs-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 9d40b8019e..0fa43fa4d1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -65,6 +65,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2020 6033fe7de85d <6033fe7de85d@airmail.cc>
+;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21776,3 +21777,41 @@ enables modal editing and composition of commands, too.  It combines ideas of
 other Editors like Vim or Kakoune and tries to align them with regular Emacs
 conventions.")
     (license license:gpl3+)))
+
+(define-public emacs-psc-ide
+  (package
+    (name "emacs-psc-ide")
+    (version "0.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/purescript-emacs/psc-ide-emacs")
+         (commit "7fc2b841be25f5bc5e1eb7d0634436181c38b3fe")))
+       (file-name (git-file-name name "0.0.0"))
+       (sha256
+        (base32
+         "0r0fymyai30jimm34z1cmav4wgij8ci6s1d9y7qigygfbbfrdsmj"))))
+    (inputs
+     `(("emacs-company" ,emacs-company)
+       ("emacs-dash" ,emacs-dash)
+       ("emacs-flycheck" ,emacs-flycheck)
+       ("emacs-let-alist" ,emacs-let-alist)
+       ("emacs-s" ,emacs-s)
+       ("emacs-seq" ,emacs-seq)))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/purescript-emacs/psc-ide-emacs")
+    (synopsis "Emacs integration for PureScript's psc-ide tool")
+    (description
+     "Emacs integration for PureScript's psc-ide tool. Featuring:
+@itemize
+@item Completions
+@item Type at point
+@item Go to definition
+@item Automatic imports
+@item Case split
+@item Build system integration
+@item Flycheck support
+@end itemize")
+    (license license:gpl3+)))
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#40301] [PATCH] Fixed some issues with the patches.
  2020-03-29  1:11 [bug#40301] [PATCH] gnu: Add emacs-psc-ide John Soo
@ 2020-04-11 16:21 ` John Soo
  2020-04-11 19:55   ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-04-11 16:21 UTC (permalink / raw)
  To: 40301

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

Hi Guix,

I rebased these commits on master, moved the build-system field up, and
put the sha string on the same line as base32. I also moved the
definition further up in the file to avoid conflicts.

Thanks!

John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-psc-ide.patch --]
[-- Type: text/x-patch, Size: 1961 bytes --]

From ce0c61cbf65fbda29f5fa8ebd5c22558d71eec62 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 24 Mar 2020 07:36:28 -0700
Subject: [PATCH] gnu: Add emacs-psc-ide.

* gnu/packages/emacs-xyz.scm (emacs-psc-ide): New variable.
---
 gnu/packages/emacs-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e700920266..25a854cf5a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -12334,6 +12334,43 @@ keychains.  The keychain entries are displayed in a directory-like structure
 and can be consulted and modified.")
     (license license:gpl3+)))
 
+(define-public emacs-psc-ide
+  (package
+    (name "emacs-psc-ide")
+    (version "0.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/purescript-emacs/psc-ide-emacs")
+         (commit "7fc2b841be25f5bc5e1eb7d0634436181c38b3fe")))
+       (file-name (git-file-name name "0.0.0"))
+       (sha256
+        (base32 "0r0fymyai30jimm34z1cmav4wgij8ci6s1d9y7qigygfbbfrdsmj"))))
+    (build-system emacs-build-system)
+    (inputs
+     `(("emacs-company" ,emacs-company)
+       ("emacs-dash" ,emacs-dash)
+       ("emacs-flycheck" ,emacs-flycheck)
+       ("emacs-let-alist" ,emacs-let-alist)
+       ("emacs-s" ,emacs-s)
+       ("emacs-seq" ,emacs-seq)))
+    (home-page "https://github.com/purescript-emacs/psc-ide-emacs")
+    (synopsis "Emacs integration for PureScript's psc-ide tool")
+    (description
+     "Emacs integration for PureScript's psc-ide tool. Featuring:
+@itemize
+@item Completions
+@item Type at point
+@item Go to definition
+@item Automatic imports
+@item Case split
+@item Build system integration
+@item Flycheck support
+@end itemize")
+    (license license:gpl3+)))
+
 (define-public emacs-evil-anzu
   (package
     (name "emacs-evil-anzu")
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#40301] [PATCH] Fixed some issues with the patches.
  2020-04-11 16:21 ` [bug#40301] [PATCH] Fixed some issues with the patches John Soo
@ 2020-04-11 19:55   ` Nicolas Goaziou
  2020-04-12  0:45     ` John Soo
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2020-04-11 19:55 UTC (permalink / raw)
  To: John Soo; +Cc: 40301

Hello,

John Soo <jsoo1@asu.edu> writes:

> I rebased these commits on master, moved the build-system field up, and
> put the sha string on the same line as base32. I also moved the
> definition further up in the file to avoid conflicts.

Thank you!

> +(define-public emacs-psc-ide
> +  (package
> +    (name "emacs-psc-ide")
> +    (version "0.0.0")

According to "Version:" keyword in "psc-ide.el", it is "0.1.0". Also,
you need to add a revision number, "0", or "1" at this point.

> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://github.com/purescript-emacs/psc-ide-emacs")
> +         (commit "7fc2b841be25f5bc5e1eb7d0634436181c38b3fe")))

The commit should be moved in a top-level `let' at the beginning of the
package definition.

> +       (file-name (git-file-name name "0.0.0"))

This should use version, along with the revision number.
> +    (synopsis "Emacs integration for PureScript's psc-ide tool")
> +    (description
> +     "Emacs integration for PureScript's psc-ide tool. Featuring:

Description should be made of full sentences. Also, it might be useful
to explain what "psc-ide" tool is.

Could you send an updated patch?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#40301] [PATCH] Fixed some issues with the patches.
  2020-04-11 19:55   ` Nicolas Goaziou
@ 2020-04-12  0:45     ` John Soo
  2020-04-12  9:04       ` bug#40301: " Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-04-12  0:45 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 40301

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]

Hi Nicolas,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> +(define-public emacs-psc-ide
>> +  (package
>> +    (name "emacs-psc-ide")
>> +    (version "0.0.0")
>
> According to "Version:" keyword in "psc-ide.el", it is "0.1.0". Also,
> you need to add a revision number, "0", or "1" at this point.
> ...
>> +    (source
>> +     (origin
>> +       (method git-fetch)
>> +       (uri
>> +        (git-reference
>> +         (url "https://github.com/purescript-emacs/psc-ide-emacs")
>> +         (commit "7fc2b841be25f5bc5e1eb7d0634436181c38b3fe")))
>
> The commit should be moved in a top-level `let' at the beginning of the
> package definition.
>
>> +       (file-name (git-file-name name "0.0.0"))
>
> This should use version, along with the revision number.
>> +    (synopsis "Emacs integration for PureScript's psc-ide tool")
>> +    (description
>> +     "Emacs integration for PureScript's psc-ide tool. Featuring:

Ok I added the revision and the commit and used git-version and
git-file-name. As an aside, what does the revision mean? Maybe if I
really understand it I can submit better patches in the future.

> Description should be made of full sentences. Also, it might be useful
> to explain what "psc-ide" tool is.

I think I clarified the description a little. This was an excellent
detailed review, thank you so much.

Also, I changed inputs->propagated-inputs.

Kindly,

John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: psc-ide --]
[-- Type: text/x-patch, Size: 2191 bytes --]

From 20e7f672bb002e8e0e784300789c3e11aeabd41f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Tue, 24 Mar 2020 07:36:28 -0700
Subject: [PATCH] gnu: Add emacs-psc-ide.

* gnu/packages/emacs-xyz.scm (emacs-psc-ide): New variable.
---
 gnu/packages/emacs-xyz.scm | 41 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e700920266..530eee7eb7 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -12334,6 +12334,47 @@ keychains.  The keychain entries are displayed in a directory-like structure
 and can be consulted and modified.")
     (license license:gpl3+)))
 
+(define-public emacs-psc-ide
+  (let ((revision "1")
+        (commit "7fc2b841be25f5bc5e1eb7d0634436181c38b3fe"))
+    (package
+      (name "emacs-psc-ide")
+      (version (git-version "0.1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/purescript-emacs/psc-ide-emacs")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0r0fymyai30jimm34z1cmav4wgij8ci6s1d9y7qigygfbbfrdsmj"))))
+      (build-system emacs-build-system)
+      (propagated-inputs
+       `(("emacs-company" ,emacs-company)
+         ("emacs-dash" ,emacs-dash)
+         ("emacs-flycheck" ,emacs-flycheck)
+         ("emacs-let-alist" ,emacs-let-alist)
+         ("emacs-s" ,emacs-s)
+         ("emacs-seq" ,emacs-seq)))
+      (home-page "https://github.com/purescript-emacs/psc-ide-emacs")
+      (synopsis "Emacs integration for PureScript's psc-ide tool")
+      (description
+       "PureScript implements an ide protocol in its compiler called psc-ide.
+This package provices Emacs integration for psc-ide.  It features:
+
+@itemize
+@item Completions
+@item Type at point
+@item Go to definition
+@item Automatic imports
+@item Case split
+@item Build system integration, and
+@item Flycheck support
+@end itemize")
+      (license license:gpl3+))))
+
 (define-public emacs-evil-anzu
   (package
     (name "emacs-evil-anzu")
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#40301: [PATCH] Fixed some issues with the patches.
  2020-04-12  0:45     ` John Soo
@ 2020-04-12  9:04       ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2020-04-12  9:04 UTC (permalink / raw)
  To: John Soo; +Cc: 40301-done

Hello,

John Soo <jsoo1@asu.edu> writes:

> Ok I added the revision and the commit and used git-version and
> git-file-name. As an aside, what does the revision mean? Maybe if I
> really understand it I can submit better patches in the future.

If there is no proper versioning for the package (e.g., no releases, or
version strings hidden in a source file), we have to rely on commit
hashes. But commit hashes are not monotonic. So, if you package, e.g.,
"emacs-psc-ide" with commit "bbbb", and later, update it to include
latest commit "aaaa", you have, from Guix's point of view, downgraded
the package, even though "aaaa" is more advanced than "bbbb".

The revision number solves that. Each time you update the commit
message, you increase the revision number, so you releases are
monotonic. E.g., your first package will be "emacs-psc-ide-1-bbbb", and
the other "emacs-psc-ide-2-aaaa".

> Subject: [PATCH] gnu: Add emacs-psc-ide.
>
> * gnu/packages/emacs-xyz.scm (emacs-psc-ide): New variable.

Thank you. Applied as 8a00a2202ef2a0a0173e17479359370f5656ecd0.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-12  9:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-29  1:11 [bug#40301] [PATCH] gnu: Add emacs-psc-ide John Soo
2020-04-11 16:21 ` [bug#40301] [PATCH] Fixed some issues with the patches John Soo
2020-04-11 19:55   ` Nicolas Goaziou
2020-04-12  0:45     ` John Soo
2020-04-12  9:04       ` bug#40301: " Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).