Skip to contentSkip to conversation

Some CI/buildsystems cleanup

PATCH In review Johannes Schindelin via GitGitGadget 4 participants 10 messages May 5, 2025 – Jun 2, 2025

lore
Share & tools
lore
#0 lore raw

cover Some CI/buildsystems cleanup

This patch series drops a couple of no-longer-used parts of Git's code base.

Johannes Schindelin (3):
ci: stop linking the prove cache
contrib/buildsystems: drop support for building .vcproj/.vcxproj files config.mak.uname: drop the vcxproj target

 ci/run-build-and-tests.sh                  |   5 -
 ci/run-test-slice.sh                       |   5 -
 config.mak.uname                           |  76 ---
 contrib/buildsystems/Generators.pm         |  42 --
 contrib/buildsystems/Generators/QMake.pm   | 189 -------
 contrib/buildsystems/Generators/Vcproj.pm  | 579 ---------------------
 contrib/buildsystems/Generators/Vcxproj.pm | 402 --------------
 contrib/buildsystems/engine.pl             | 395 --------------
 contrib/buildsystems/generate              |  29 --
 contrib/buildsystems/parse.pl              | 228 --------
 10 files changed, 1950 deletions(-)
 delete mode 100644 contrib/buildsystems/Generators.pm
 delete mode 100644 contrib/buildsystems/Generators/QMake.pm
 delete mode 100644 contrib/buildsystems/Generators/Vcproj.pm
 delete mode 100644 contrib/buildsystems/Generators/Vcxproj.pm
 delete mode 100755 contrib/buildsystems/engine.pl
 delete mode 100755 contrib/buildsystems/generate
 delete mode 100755 contrib/buildsystems/parse.pl

base-commit: 6c0bd1fc70efaf053abe4e57c976afdc72d15377
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1916%2Fdscho%2Fci-fixes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1916/dscho/ci-fixes-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1916

Signature · 1 line
gitgitgadget
#1 lore raw

PATCH 1/3 ci: stop linking the `prove` cache

From: Johannes Schindelin <[email protected]>

It is not useful because we do not have any persisted directory anymore, not since dropping our Travis CI support.

---
 ci/run-build-and-tests.sh | 5 -----
 ci/run-test-slice.sh      | 5 -----
 2 files changed, 10 deletions(-)
ci/run-build-and-tests.sh +0 -5
index f99b7db2ee81..4e1413d3891d 100755
@@ -5,11 +5,6 @@
 
 . ${0%/*}/lib.sh
 
-case "$CI_OS_NAME" in
-windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
-*) ln -s "$cache_dir/.prove" t/.prove;;
-esac
-
 run_tests=t
 
 case "$jobname" in
ci/run-test-slice.sh +0 -5
index e167e646f79e..0444c79c023c 100755
@@ -5,11 +5,6 @@
 
 . ${0%/*}/lib.sh
 
-case "$CI_OS_NAME" in
-windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
-*) ln -s "$cache_dir/.prove" t/.prove;;
-esac
-
 group "Run tests" make --quiet -C t T="$(cd t &&
 	./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh |
 	tr '\n' ' ')" ||
Signature · 1 line
gitgitgadget
#2 lore raw

PATCH 2/3 contrib/buildsystems: drop support for building .vcproj/.vcxproj files

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

Before we had CMake support, the only way to build Git in Visual Studio was via this hacky generate script.

For a while I tried to fix whenever things got broken, in particular to allow building confidence in embargoed releases by running the CI builds in Azure Pipelines in a private Azure DevOps project. I even carried the patches in Git for Windows with the intention of upstreaming them, eventually.

However, it is a lot of work with too little benefit. CMake is much better supported by Visual Studio. So let's drop this hacky script (plus support code).

---
 contrib/buildsystems/Generators.pm         |  42 --
 contrib/buildsystems/Generators/QMake.pm   | 189 -------
 contrib/buildsystems/Generators/Vcproj.pm  | 579 ---------------------
 contrib/buildsystems/Generators/Vcxproj.pm | 402 --------------
 contrib/buildsystems/engine.pl             | 395 --------------
 contrib/buildsystems/generate              |  29 --
 contrib/buildsystems/parse.pl              | 228 --------
 7 files changed, 1864 deletions(-)
 delete mode 100644 contrib/buildsystems/Generators.pm
 delete mode 100644 contrib/buildsystems/Generators/QMake.pm
 delete mode 100644 contrib/buildsystems/Generators/Vcproj.pm
 delete mode 100644 contrib/buildsystems/Generators/Vcxproj.pm
 delete mode 100755 contrib/buildsystems/engine.pl
 delete mode 100755 contrib/buildsystems/generate
 delete mode 100755 contrib/buildsystems/parse.pl
contrib/buildsystems/Generators.pm deleted +0 -42
deleted file mode 100644
index aa4cbaa2adac..000000000000
@@ -1,42 +0,0 @@
-package Generators;
-require Exporter;
-
-use strict;
-use File::Basename;
-no strict 'refs';
-use vars qw($VERSION @AVAILABLE);
-
-our $VERSION = '1.00';
-our(@ISA, @EXPORT, @EXPORT_OK, @AVAILABLE);
-@ISA = qw(Exporter);
-
-BEGIN {
-    local(*D);
-    my $me = $INC{"Generators.pm"};
-    die "Couldn't find myself in \@INC, which is required to load the generators!" if ("$me" eq "");
-    $me = dirname($me);
-    if (opendir(D,"$me/Generators")) {
-        foreach my $gen (readdir(D)) {
-            next unless ($gen  =~ /\.pm$/);
-            require "${me}/Generators/$gen";
-            $gen =~ s,\.pm,,;
-            push(@AVAILABLE, $gen);
-        }
-        closedir(D);
-        my $gens = join(', ', @AVAILABLE);
-    }
-
-    push @EXPORT_OK, qw(available);
-}
-
-sub available {
-    return @AVAILABLE;
-}
-
-sub generate {
-    my ($gen, $git_dir, $out_dir, $rel_dir, %build_structure) = @_;
-    return eval("Generators::${gen}::generate(\$git_dir, \$out_dir, \$rel_dir, \%build_structure)") if grep(/^$gen$/, @AVAILABLE);
-    die "Generator \"${gen}\" is not available!\nAvailable generators are: @AVAILABLE\n";
-}
-
-1;
contrib/buildsystems/Generators/QMake.pm deleted +0 -189

189 lines not on this page · raw message

contrib/buildsystems/Generators/Vcproj.pm deleted +0 -579

579 lines not on this page · raw message

contrib/buildsystems/Generators/Vcxproj.pm deleted +0 -402

402 lines not on this page · raw message

contrib/buildsystems/engine.pl deleted +0 -395

395 lines not on this page · raw message

contrib/buildsystems/generate deleted +0 -29
deleted file mode 100755
index bc10f25ff24a..000000000000
@@ -1,29 +0,0 @@
-#!/usr/bin/perl -w
-######################################################################
-# Generate buildsystem files
-#
-# This script generate buildsystem files based on the output of a
-# GNU Make --dry-run, enabling Windows users to develop Git with their
-# trusted IDE with native projects.
-#
-# Note:
-# It is not meant as *the* way of building Git with MSVC, but merely a
-# convenience. The correct way of building Git with MSVC is to use the
-# GNU Make tool to build with the maintained Makefile in the root of
-# the project. If you have the msysgit environment installed and
-# available in your current console, together with the Visual Studio
-# environment you wish to build for, all you have to do is run the
-# command:
-#     make MSVC=1
-#
-# Copyright (C) 2009 Marius Storm-Olsen <[email protected]>
-######################################################################
-use strict;
-use File::Basename;
-use Cwd;
-
-my $git_dir = getcwd();
-$git_dir =~ s=\\=/=g;
-$git_dir = dirname($git_dir) while (!-e "$git_dir/git.c" && "$git_dir" ne "");
-die "Couldn't find Git repo" if ("$git_dir" eq "");
-exec join(" ", ("PERL5LIB=${git_dir}/contrib/buildsystems ${git_dir}/contrib/buildsystems/engine.pl", @ARGV));
contrib/buildsystems/parse.pl deleted +0 -228

228 lines not on this page · raw message

Signature · 1 line
gitgitgadget
#8 lore raw

PATCH 3/3 config.mak.uname: drop the `vcxproj` target

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

Now that we dropped contrib/buildsystems/generate to generate Visual Studio Solution files, it is time to also drop the vcxproj Makefile target that depended on that script.

---
 config.mak.uname | 76 ------------------------------------------------
 1 file changed, 76 deletions(-)
config.mak.uname +0 -76
index db22a8fb3113..524a7faa3098 100644
@@ -766,79 +766,3 @@ ifeq ($(uname_S),QNX)
 	NO_STRCASESTR = YesPlease
 	NO_STRLCPY = YesPlease
 endif
-
-vcxproj:
-	# Require clean work tree
-	git update-index -q --refresh && \
-	git diff-files --quiet && \
-	git diff-index --cached --quiet HEAD --
-
-	# Make .vcxproj files and add them
-	perl contrib/buildsystems/generate -g Vcxproj
-	git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
-
-	# Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
-	(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
-	 echo '  <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
-	 for name in $(BUILT_INS);\
-	 do \
-	   echo '    <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
-	 done && \
-	 echo '  </Target>' && \
-	 echo '</Project>') >git/LinkOrCopyBuiltins.targets
-	(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
-	 echo '  <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
-	 for name in $(REMOTE_CURL_ALIASES); \
-	 do \
-	   echo '    <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
-	 done && \
-	 echo '  </Target>' && \
-	 echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets
-	git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets
-
-	# Add generated headers
-	$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(GENERATED_H)
-	git add -f $(GENERATED_H)
-
-	# Add scripts
-	rm -f perl/perl.mak
-	$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(SCRIPT_LIB) $(SCRIPTS)
-	# Strip out the sane tool path, needed only for building
-	sed -i '/^git_broken_path_fix ".*/d' git-sh-setup
-	git add -f $(SCRIPT_LIB) $(SCRIPTS)
-
-	# Add Perl module
-	$(MAKE) $(LIB_PERL_GEN)
-	git add -f perl/build
-
-	# Add bin-wrappers, for testing
-	rm -rf bin-wrappers/
-	$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(test_bindir_programs)
-	# Ensure that the GIT_EXEC_PATH is a Unix-y one, and that the absolute
-	# path of the repository is not hard-coded (GIT_EXEC_PATH will be set
-	# by test-lib.sh according to the current setup)
-	sed -i -e 's/^\(GIT_EXEC_PATH\)=.*/test -n "$${\1##*:*}" ||\
-			\1="$$(cygpath -u "$$\1")"/' \
-		-e "s|'$$(pwd)|\"\$$GIT_EXEC_PATH\"'|g" bin-wrappers/*
-	# Ensure that test-* helpers find the .dll files copied to top-level
-	sed -i 's|^PATH=.*|&:"$$GIT_EXEC_PATH"|' bin-wrappers/test-*
-	# We do not want to force hard-linking builtins
-	sed -i 's|\(git\)-\([-a-z]*\)\.exe"|\1.exe" \2|g' \
-		bin-wrappers/git-{receive-pack,upload-archive}
-	git add -f $(test_bindir_programs)
-
-	# Add templates
-	$(MAKE) -C templates
-	git add -f templates/boilerplates.made templates/blt/
-
-	# Add the translated messages
-	make MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(MOFILES)
-	git add -f $(MOFILES)
-
-	# Add build options
-	$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 GIT-BUILD-OPTIONS
-	git add -f GIT-BUILD-OPTIONS
-
-	# Commit the whole shebang
-	git commit -m "Generate Visual Studio solution" \
-		-m "Auto-generated by \`$(MAKE)$(MAKEFLAGS) $@\`"
Signature · 1 line
gitgitgadget
#3 lore raw

Re: [PATCH 2/3] contrib/buildsystems: drop support for building .vcproj/.vcxproj files

In reply to Johannes Schindelin via GitGitGadget
Quoted 11 lines · Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

Before we had CMake support, the only way to build Git in Visual Studio was via this hacky generate script.

For a while I tried to fix whenever things got broken, in particular to allow building confidence in embargoed releases by running the CI builds in Azure Pipelines in a private Azure DevOps project. I even carried the patches in Git for Windows with the intention of upstreaming them, eventually.

Quoted 3 lines

However, it is a lot of work with too little benefit. CMake is much better supported by Visual Studio. So let's drop this hacky script (plus support code).

Makes sense. This made me wonder whether we also want to get rid of "contrib/vscode", which is similar in spirit. Both Meson and CMake can be used natively with VSCode.

Thanks for working on these cleanups!

Patrick

#4 lore raw

Re: [PATCH 2/3] contrib/buildsystems: drop support for building .vcproj/.vcxproj files

Hi Patrick,

Quoted 3 lines · Patrick Steinhardt

[I] wonder whether we also want to get rid of "contrib/vscode", which is similar in spirit. Both Meson and CMake can be used natively with VSCode.

I would like to avoid that, as the contrib/vscode/ files do not even have anything in the way of building Git. Instead, there is a configuration that allows Intellisense to find the symbols' declarations and definitions, and it specifies a little bit the style conventions as well as common terms that the cSpell checker benefits from.

I use this on almost a daily basis, so I believe that contrib/vscode/ is in a _much_ better shape than contrib/buildsystems/' Visual Studio support code ever was. For that reason, I am a lot more in favor of keeping the vscode/ stuff.

Ciao,
Johannes

#9 lore raw
In reply to Johannes Schindelin via GitGitGadget

"Johannes Schindelin via GitGitGadget" <[email protected]>

Quoted 6 lines · writes:

This patch series drops a couple of no-longer-used parts of Git's code base.

Johannes Schindelin (3):
ci: stop linking the prove cache
contrib/buildsystems: drop support for building .vcproj/.vcxproj files config.mak.uname: drop the vcxproj target

Thanks, will queue.

#5 lore raw

Re: [PATCH 2/3] contrib/buildsystems: drop support for building .vcproj/.vcxproj files

In reply to Johannes Schindelin
Quoted 14 lines · Johannes Schindelin

Hi Patrick,

Quoted 3 lines · Patrick Steinhardt

[I] wonder whether we also want to get rid of "contrib/vscode", which is similar in spirit. Both Meson and CMake can be used natively with VSCode.

I would like to avoid that, as the contrib/vscode/ files do not even have anything in the way of building Git. Instead, there is a configuration that allows Intellisense to find the symbols' declarations and definitions, and it specifies a little bit the style conventions as well as common terms that the cSpell checker benefits from.

Quoted 4 lines

I use this on almost a daily basis, so I believe that contrib/vscode/ is in a _much_ better shape than contrib/buildsystems/' Visual Studio support code ever was. For that reason, I am a lot more in favor of keeping the vscode/ stuff.

Fine with me, thanks for the explanation!

Patrick

#6 lore raw

Re: [PATCH 2/3] contrib/buildsystems: drop support for building .vcproj/.vcxproj files

In reply to Johannes Schindelin via GitGitGadget

Hi Junio,

Quoted 11 lines · Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

Before we had CMake support, the only way to build Git in Visual Studio was via this hacky generate script.

For a while I tried to fix whenever things got broken, in particular to allow building confidence in embargoed releases by running the CI builds in Azure Pipelines in a private Azure DevOps project. I even carried the patches in Git for Windows with the intention of upstreaming them, eventually.

Quoted 3 lines

However, it is a lot of work with too little benefit. CMake is much better supported by Visual Studio. So let's drop this hacky script (plus support code).

I just noticed that you applied this patch as dc5e178f608f (contrib/buildsystems: drop support for building . vcproj/.vcxproj files, 2025-05-05). Notice the incorrect space between "." and "vcproj". Any idea where that came from?

Ciao,
Johannes

#7 lore raw

Re: [PATCH 2/3] contrib/buildsystems: drop support for building .vcproj/.vcxproj files

Quoted 4 lines · Johannes Schindelin

I just noticed that you applied this patch as dc5e178f608f (contrib/buildsystems: drop support for building . vcproj/.vcxproj files, 2025-05-05). Notice the incorrect space between "." and "vcproj". Any idea where that came from?

It was almost a month ago.

I have no idea and I only have one reflog entry on that topic branch (meaning it is unlikely that it came from a manual editing).