diff mbox series

[bug#55545] Get ~emacs-promise~ to build in emacs 28

Message ID 87fsl4x9hy.fsf@gmail.com
State New
Headers show
Series [bug#55545] Get ~emacs-promise~ to build in emacs 28 | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Andrew Patterson May 20, 2022, 7:55 p.m. UTC

Comments

Mathieu Othacehe June 5, 2022, 7:14 p.m. UTC | #1
Hello Andrew,

> -    (source
> -     (origin
> -       (method git-fetch)
> -       (uri (git-reference
> -             (url "https://github.com/chuntaro/emacs-promise")
> -             (commit version)))
> -       (file-name (git-file-name name version))
> -       (sha256
> -        (base32 "1xb34zdbwjvahfhycjphdkm925kgd22dr298c57hwxza4ljc2hxj"))))
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/chuntaro/emacs-promise")
> +                    (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "1xb34zdbwjvahfhycjphdkm925kgd22dr298c57hwxza4ljc2hxj"))))

This change is not related to the build fix, it shouldn't be part of
this commit.

>      (build-system emacs-build-system)
> +    (arguments
> +     `(#:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'patch-obsolete
> +                    (lambda* _
> +                      (substitute* "promise.el"
> +                        (("\\(define-obsolete-function-alias (.*) (.*)\\)" _
> +                          obsolete cur) (format #f
> +                                         "(define-obsolete-function-alias ~a ~a ~a)"
> +                                         obsolete cur "\"2020-01-10\""))))))))

This has been fixed upstream, so you could also update the package to
the latest commit, see how it's done in the emacs-libgit package for
instance.

>      (home-page "https://github.com/chuntaro/emacs-promise")
>      (synopsis "Promises/A+ for Emacs")
> -    (description "This is a simple implementation of Promises/A+.
> +    (description
> +     "This is a simple implementation of Promises/A+.
>  
>  This implementation ports the following Promises/A+ features
>  faithfully.  See @url{https://github.com/then/promise}.
> @@ -30371,7 +30381,8 @@ (define-public emacs-promise
>  @item It supports \"thenable\".
>  @item It supports \"Inheritance of Promise\".
>  @item It supports \"rejection-tracking\".
> -@end itemize\n")
> +@end itemize
> +")
>      (license license:gpl3+)))

Those changes also shouldn't be part of this patch.

Could you please send an update version?

Thanks,

Mathieu
diff mbox series

Patch

From 0df304239efa6dc480e87d2ad833195d15011053 Mon Sep 17 00:00:00 2001
From: Andrew Patterson <andrewpatt7@gmail.com>
Date: Fri, 20 May 2022 15:06:07 -0400
Subject: [PATCH] Get ~emacs-promise~ to build in emacs 28

Emacs 28 added a third required argument to ~define-obsolete-function-alias~
and friends.  Upstream has removed the aliases, but hasn't released a new version.
---
 gnu/packages/emacs-xyz.scm | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ae81f4e395..ca4dec7795 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -30347,19 +30347,29 @@  (define-public emacs-promise
   (package
     (name "emacs-promise")
     (version "1.1")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/chuntaro/emacs-promise")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "1xb34zdbwjvahfhycjphdkm925kgd22dr298c57hwxza4ljc2hxj"))))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/chuntaro/emacs-promise")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1xb34zdbwjvahfhycjphdkm925kgd22dr298c57hwxza4ljc2hxj"))))
     (build-system emacs-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-obsolete
+                    (lambda* _
+                      (substitute* "promise.el"
+                        (("\\(define-obsolete-function-alias (.*) (.*)\\)" _
+                          obsolete cur) (format #f
+                                         "(define-obsolete-function-alias ~a ~a ~a)"
+                                         obsolete cur "\"2020-01-10\""))))))))
     (home-page "https://github.com/chuntaro/emacs-promise")
     (synopsis "Promises/A+ for Emacs")
-    (description "This is a simple implementation of Promises/A+.
+    (description
+     "This is a simple implementation of Promises/A+.
 
 This implementation ports the following Promises/A+ features
 faithfully.  See @url{https://github.com/then/promise}.
@@ -30371,7 +30381,8 @@  (define-public emacs-promise
 @item It supports \"thenable\".
 @item It supports \"Inheritance of Promise\".
 @item It supports \"rejection-tracking\".
-@end itemize\n")
+@end itemize
+")
     (license license:gpl3+)))
 
 (define-public emacs-async-await

base-commit: 598f7289db9955584457ffc11c8504f3938a1618
-- 
2.36.1