all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Tropin via Guix-patches via <guix-patches@gnu.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>, 69510@debbugs.gnu.org
Cc: Mekeor Melire <mekeor@posteo.de>,
	cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com
Subject: [bug#69510] [PATCH emacs-team 1/2] guix: emacs-utils: Make emacs-compile-directory forwards-compatible.
Date: Mon, 04 Mar 2024 17:45:10 +0300	[thread overview]
Message-ID: <878r2yaweh.fsf@trop.in> (raw)
In-Reply-To: <7f3f70eedbbec74481a0ca9fea4c19250961685e.1709446767.git.liliana.prikler@gmail.com>

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

On 2024-03-02 16:56, Liliana Marie Prikler wrote:

> Newer (development) builds of Emacs 30 mark a number of functions related to
> native compilation as ‘internal’.  Since we rely on such functions and there
> does not appear to be a high-level replacement at the moment, let's work
> around this case.
>
> * guix/build/emacs-utils.scm (emacs-compile-directory): Require comp early
> and check if ‘comp-write-bytecode-file’ is available.
>
> Fixes: Upstream renamed comp-write-bytecode-file <https://bugs.gnu.org/69201>
> ---
>  guix/build/emacs-utils.scm | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
> index eca42bf305..aeb364133a 100644
> --- a/guix/build/emacs-utils.scm
> +++ b/guix/build/emacs-utils.scm
> @@ -136,7 +136,14 @@ (define* (emacs-compile-directory dir)
>    (emacs-batch-eval
>      `(let ((byte-compile-debug t)       ; for proper exit status
>             (byte+native-compile (native-comp-available-p))
> -           (files (directory-files-recursively ,dir "\\.el$")))
> +           (files (directory-files-recursively ,dir "\\.el$"))
> +           (write-bytecode
> +            (and (native-comp-available-p)
> +                 (progn
> +                  (require 'comp)
> +                  (if (fboundp 'comp-write-bytecode-file)
> +                      'comp-write-bytecode-file
> +                      'comp--write-bytecode-file)))))
>         (mapc
>          (lambda (file)
>            (let (byte-to-native-output-buffer-file
> @@ -152,7 +159,7 @@ (define* (emacs-compile-directory dir)
>                  (byte-compile-file file))
>              ;; After native compilation, write the bytecode file.
>              (unless (null byte-to-native-output-buffer-file)
> -              (comp-write-bytecode-file nil))))
> +              (funcall write-bytecode nil))))
>         files))
>      #:dynamic? #t))
>  
>
> base-commit: 3d4fc910f73220f47e5f2459853333a7c83c5d1d

Hi Liliana!

Looks reasonable to me.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      parent reply	other threads:[~2024-03-04 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-02 17:08 [bug#69510] [PATCH emacs-team 0/2] Update emacs-next Liliana Marie Prikler
2024-03-02 15:56 ` [bug#69510] [PATCH emacs-team 1/2] guix: emacs-utils: Make emacs-compile-directory forwards-compatible Liliana Marie Prikler
2024-03-02 16:13   ` [bug#69510] [PATCH emacs-team 2/2] gnu: emacs-next-minimal: Update to 30.0.50-2.170c655 Liliana Marie Prikler
2024-03-04 14:45   ` Andrew Tropin via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878r2yaweh.fsf@trop.in \
    --to=guix-patches@gnu.org \
    --cc=69510@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=liliana.prikler@gmail.com \
    --cc=mekeor@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.