[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New "make benchmark" target
From: |
Pip Cet |
Subject: |
Re: New "make benchmark" target |
Date: |
Sat, 18 Jan 2025 20:52:46 +0000 |
"Andrea Corallo" <acorallo@gnu.org> writes:
> 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
I believe the tiny creatures in my code are bugs, not 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.
Yes, my mail program acted up; it's a single very long line in the
original, which I think is acceptable in this special case. If it's
not, we should use a heredoc so the command line can readily be copied.
> 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?
No, it shows up here. Is it possible that your
externals/elisp-benchmarks branch is outdated? Can you try running with
origin/externals/elisp-benchmarks instead (or whatever your remote is
called)?
$ git log HEAD^2 -1
commit 63b8ca0c2931d829a1c0d5376de3eb0b58217fd6
(elpa2emacs-filtered-elpa-nonce1737233061/nonce1737233061,
elpa2emacs-filtered-elpa-nonce1737233061/externals/elisp-benchmarks)
Author: Andrea Corallo <acorallo@gnu.org>
Date: Mon Jan 6 10:39:52 2025 +0100
* benchmarks/bubble-no-cons.el (elb-bubble-no-cons): Fix provide.
> 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?
We do, but currently only for successful runs. We should trap and tell
the user what to delete (but not do so automatically because we might
have to demice^H^H^H^Hbug things further).
Pip
- Re: New "make benchmark" target, (continued)
- Re: New "make benchmark" target, Pip Cet, 2025/01/05
- Re: New "make benchmark" target, Stefan Kangas, 2025/01/15
- Re: New "make benchmark" target, Eli Zaretskii, 2025/01/16
- Re: New "make benchmark" target, Andrea Corallo, 2025/01/17
- Re: New "make benchmark" target, Pip Cet, 2025/01/17
- Re: New "make benchmark" target, Andrea Corallo, 2025/01/17
- Re: New "make benchmark" target, Pip Cet, 2025/01/17
- Re: New "make benchmark" target, Andrea Corallo, 2025/01/18
- Re: New "make benchmark" target, Pip Cet, 2025/01/18
- Re: New "make benchmark" target, Andrea Corallo, 2025/01/18
- Re: New "make benchmark" target,
Pip Cet <=
Re: New "make benchmark" target, Andrea Corallo, 2025/01/06