emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New "make benchmark" target


From: Andrea Corallo
Subject: Re: New "make benchmark" target
Date: Sat, 18 Jan 2025 15:33:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Pip Cet <pipcet@protonmail.com> writes:

> Pip Cet <pipcet@protonmail.com> writes:
>
>> "Andrea Corallo" <acorallo@gnu.org> writes:
>
>>> I've git.sv.gnu.org/srv/git/emacs.git called 'savannah' instead of
>>> 'origin' as I've other remotes.  I think we should have a way to specify
>>> the remote name.
>>
>> Hmm.  Wouldn't that be confusing in the case where people use a fresh
>> checkout rather than a new worktree?
>
> I decided just to remove that option.  The new version of the script is
> run from the emacs repository, avoiding the need to create an extra
> emacs worktree completely.  The elpa repository can be provided in the
> emacs directory (in a subdirectory called "elpa"), or it can be checked
> out from savannah.
>
> Further changes:
>
> 1. Use bash -e to abort after an error.
> 2. Clone the ELPA repository from emacs/elpa if available; if not, we
> clone it from savannah
> 3. Work in a temporary directory (use mktemp)
> 4. Safety prompt
> 5. Consistently name remotes and branches with nonce value
> 6. Use A==>B syntax for paths, allowing us to create several directories
> 7. Finally, tell the user what to do afterwards (git commit -n)

Mice

> As a side effect of (2), this script runs much faster than the previous
> version.  I mention this because that confused me at first.
>
> I haven't tested this without an existing elpa repository copy.
> Checking out elpa from savannah takes quite a while.
>
> Here's the new script:
>
> #!/bin/bash -e
> # Merge ELPA package into the Emacs repository
>
> # Copyright (C) 2024-2025 Free Software Foundation, Inc.
>
> # This file is part of GNU Emacs.
>
> # GNU Emacs is free software: you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> # the Free Software Foundation, either version 3 of the License, or
> # (at your option) any later version.
>
> # GNU Emacs is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> # GNU General Public License for more details.
>
> # You should have received a copy of the GNU General Public License
> # along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
>
> # This code merges an ELPA package that lives in a branch of
> # https://git.savannah.gnu.org/git/emacs/elpa.git into the Emacs repo.
> #
> # It attempts to do the following things:
> #
> # - Move mentioned files to new directories
> #
> # - Preserve complete history from original repo for the files
>
> # Dependencies required
> #
> # - https://github.com/newren/git-filter-repo
> #    nix shell nixpkgs#git-filter-repo
> #    arch: pacman -S git-filter-repo
> # - git
>
> # The code is originally from
> # https://gist.github.com/2ed97f2ec85958986983d5cb78202770.git
>
> # Authors:
> #  Payas Relekar <relekarpayas@gmail.com>
> #  João Távora <joaotavora@gmail.com>
> #  Pip Cet <pipcet@protonmail.com>
>
> # The ELPA repo will be cloned, unless a copy is provided in the "elpa"
> # subdirectory of the emacs repository.  You should not use a worktree!
> #
> # Run like this:
> #
> # bash -ex ./admin/elpa2emacs.sh externals/elisp-benchmarks
> "benchmarks==>benchmarks/benchmarks"
> "resources==>benchmarks/resources"
> "elisp-benchmarks.el==>benchmarks/elisp-benchmarks.el"
> #

I guess these should be commented.

I tried to run on the current the script with:

bash -ex ./admin/elpa2emacs.sh externals/elisp-benchmarks 
"benchmarks==>benchmarks/benchmarks" "resources==>benchmarks/resources" 
"elisp-benchmarks.el==>benchmarks/elisp-benchmarks.el"

In the emacs/ folder I can't see merged the last commit from
elisp-benchmarks (03e668caf8), I think is missing from the filtered
commits, do you see the same?

Also I see many elpa2emacs-filtered-elpa/nonce1737231566 like remotes
which gets accomulated by different runs, I guess we should clean them
up at the end of each run?

Thanks

  Andrea



reply via email to

[Prev in Thread] Current Thread [Next in Thread]