Re: [PATCH v3 00/20] t: drop Perl as a mandatory prerequisite
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 2, 2025, 19:32 UTC
- Message-ID
- <4d87ad16-3995-1dca-7440-6aa6b26063d8@gmx.de>
- In-Reply-To
- <20250327-b4-pks-t-perlless-v3-0-b436de9da1b8@pks.im>
Hi Patrick,
On Thu, 27 Mar 2025, Patrick Steinhardt wrote:
Show 36 quoted lines
> while Git was initially building on Perl quite a lot, the significance > of Perl has been dwindling over the years as more and more functionality > was converted into C builtins. Nowadays, an installation with Perl-based > features disabled is almost fully functional, only a handful of features > remain that require Perl: > > - gitweb, a read-only web interface. > > - A couple of scripts that allow importing repositories from GNU Arch, > CVS and Subversion. > > - git-send-email(1), which can be used to send mails. > > - Our Perl bindings for Git. > > - The netrc Git credential helper. > > None of these features really are critical for day-to-day usage of Git, > and most users probably wouldn't even notice if those features were not > installed. Perl is thus very much optional nowadays. > > There is one big exception though: it is impossible to run our test > suite without a Perl interpreter, so it is not easily possible to verify > that a Perl-less installation actually works as expected. For most of > the part though our test suite doesn't use all that much Perl, either. > It is present in a couple of critical paths, but those are easy to adapt > to not use Perl anymore. > > This is exactly what this patch series does: it refactors a couple of > central parts in our test suite to not use Perl anymore so that it > becomes possible to run most of our tests entirely without Perl. Tests > that still depend on Perl are marked with a new PERL_TEST_HELPERS prereq > so that they only execute when a Perl interpreter is available. > > With this patch series, 30342 out of 31358 tests pass, which is around > 97% of our tests.
Thank you so much for working on this. I finally finished my review, I simply ran out of time yesterday. The patches look good to me, and the result even more so.
From my perspective, it also sure looks like good timing, even so much as two years ago it would probably not have been realistically achievable to drop Git's test suite's dependency on Perl.
On Git for Windows' side, I have opened a ticket [*1*] that even discusses the idea of dropping Perl from Git for Windows' installer altogether. The appeal of this is that Perl is quite a hefty dependency with all of those Perl modules that are part of the set that Perl users simply expect to be present. I did not investigate this fully yet, but would expect a reduction of at least 10MB, and Git for Windows carries this essentially for `git svn` and little else.
So yes, I am quite happy about this direction, and could also imagine that at least the Windows test jobs (which use `prove` like the rest of the tests in Git's CI builds) could potentially switch away from `prove` to `test-tool run-command testsuite` and then drop Perl from the `git-sdk-x86_64-minimal` artifact that needs to be downloaded and installed for every single Windows job of Git's CI. (The `test-tool` may need to learn a few more tricks, but I'd be surprised if any non-trivial patches were needed there to essentially replace `prove` as far as Git's needs are concerned.)
Ciao, Johannes
Footnote *1*: https://github.com/git-for-windows/git/issues/5393