[bug#70632,1/2] aux-files: comp-integrity: Adjust for newer emacs.

Message ID CH3PR84MB3424B66223D97660AD97AFDAC5E52@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
State New
Headers
Series [bug#70632,1/2] aux-files: comp-integrity: Adjust for newer emacs. |

Commit Message

Morgan Smith May 8, 2024, 6:48 p.m. UTC
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Mittwoch, dem 01.05.2024 um 16:06 -0400 schrieb Morgan Smith:
> TL;DR: If we do a new file or a phase, we only rebuild emacs-next.  If
> we modify the file in-place, we rebuild emacs, because it uses it. 
> Between a phase and a new file, a new file is preferable, because we
> can then 'mv' it over the old one.

I apologize.  In my mind we where talking about two different changes at
the same time.  A change to emacs-next right now, and a change that
would rebuild all of emacs but live on a branch for now.

I still think that's the optimal route.  Apply the phase patch right now
to main, and then the file modification to some branch.

On a related note, I do have two changes I'd like to make when we
rebuild all of emacs.  I've attached the changes to this mail despite it
not being quite the right place to send them.  Also I didn't actually
test them because I don't really want to rebuild all of that myself.

>> In guix/build/emacs-utils.scm:emacs-generate-autoloads, there is a
>> condition to support emacs 28.  I don't think we ever use that path
>> anymore but it is nice to have a robust function that "just works".
>> Espiaclly back when we did have emacs 28 and 29 packages in guix.
> This is somewhat legacy code that has grown that way back when Emacs 29
> was emacs-next.  There was no good reason to drop it with the switch,
> but come Emacs 30, 31, and maintainability might be one.

My issue isn't that you're wrong, but rather I would argue "it's not a
big deal".  To maintain clean minimal code we should remove that
condition and so I see your point.  But also, it is such a small
addition of code that adds significant backwards compatibility to the
function.
  

Comments

Liliana Marie Prikler July 7, 2024, 6:36 a.m. UTC | #1
Am Mittwoch, dem 08.05.2024 um 14:48 -0400 schrieb Morgan Smith:
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > Am Mittwoch, dem 01.05.2024 um 16:06 -0400 schrieb Morgan Smith:
> > TL;DR: If we do a new file or a phase, we only rebuild emacs-next. 
> > If we modify the file in-place, we rebuild emacs, because it uses
> > it.  Between a phase and a new file, a new file is preferable,
> > because we can then 'mv' it over the old one.
> 
> I apologize.  In my mind we where talking about two different changes
> at the same time.  A change to emacs-next right now, and a change
> that would rebuild all of emacs but live on a branch for now.
> 
> I still think that's the optimal route.  Apply the phase patch right
> now to main, and then the file modification to some branch.
I've recently pushed an update to master that has a new integrity check
for emacs-next; using emacs-next intrinsics rather than going through
help-fns.

Thus marking this as done.

> On a related note, I do have two changes I'd like to make when we
> rebuild all of emacs.  I've attached the changes to this mail despite
> it not being quite the right place to send them.  Also I didn't
> actually test them because I don't really want to rebuild all of that
> myself.
Sorry for the late review on those, but you might want to revisit them
and send them as a new patch series.

> +          (message "Compiling `%s'")
That doesn't look right.

> [PATCH 1/2] build-system/emacs: Allow usage of
>  #:{allowed/disallowed}-references key
> 
> * guix/build-system/emacs.scm (emacs-build): Pass #:allowed-
> references and
> 
> Change-Id: Ib9a35a7b2115365b96675fb7ca3914b0ae7e67c7
> #:disallowed-references keys to builder.
The references are actually being ignored here.

Cheers
  

Patch

From 32ba147bbccaa21524487f2fa216cf1f4a18d884 Mon Sep 17 00:00:00 2001
Message-ID: <32ba147bbccaa21524487f2fa216cf1f4a18d884.1715193630.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <bfb0492b28dddd69bc894de278b5ccbd0d12bd33.1715193630.git.Morgan.J.Smith@outlook.com>
References: <bfb0492b28dddd69bc894de278b5ccbd0d12bd33.1715193630.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Wed, 8 May 2024 14:40:00 -0400
Subject: [PATCH 2/2] guix: emacs-utils: Be more verbose in build phase.

* guix/build/emacs-utils.scm (emacs-compile-directory): Display the filename
of each file before compiling.

Change-Id: I275a086ed92f7cfb2907aea9b4feb59012cc8dd5
---
 guix/build/emacs-utils.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index aeb364133a..f35d9e690f 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -146,6 +146,7 @@  (define* (emacs-compile-directory dir)
                       'comp--write-bytecode-file)))))
        (mapc
         (lambda (file)
+          (message "Compiling `%s'")
           (let (byte-to-native-output-buffer-file
                 ;; First entry is the eln-cache of the homeless shelter,
                 ;; second entry is the install directory.
-- 
2.41.0