git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: phillip.wood@dunelm.org.uk
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Taylor Blau <me@ttaylorr.com>,
	git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] test-lib.sh: discover "git" in subdirs of "contrib/buildsystems/out"
Date: Tue, 06 Dec 2022 11:57:37 +0100	[thread overview]
Message-ID: <221206.865yeodbtg.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <30360f4c-91a5-177b-133f-eb7036ed676a@dunelm.org.uk>


On Tue, Dec 06 2022, Phillip Wood wrote:

> On 06/12/2022 03:52, Junio C Hamano wrote:
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>> 
>>> Just to add my own digression: I asked in some past thread (which I'm
>>> too lazy to dig up) why it was the cmake file couldn't just dispatch to
>>> "make" for most things.
>
> Because make is not installed by default on Windows. Our CI job uses
> msbuild (whatever that is) and when I was playing with Visual Studio 
> last week it was using ninja.
>
>>> I.e. it needs to at some level be aware of what it's building for the
>>> IDE integration, but for say making a "grep.o" there's no reason it
>>> couldn't be running:
>>>
>>> 	make grep.o
>>>
>>> Instead of:
>>>
>>>          cc <args> -o grep grep.c [...]
>>>
>>> which requires duplicating much of the Makefile logic (possibly with
>>> some Makefile shim to not consider any dependencies in that case).
>> That leads to a question at the other extreme.  Why does any logic
>> in CMakeLists.txt even have to exist at all?  Whenever it is asked
>> to make foo, it can be running "make foo" instead of having its own
>> logic at all.  ;-)
>
> Yes, if make was available then we wouldn't need to use CMake.

I think Junio and I are talking about something slightly different. Yes
"make" isn't available by default. Getting it requires installing a
larger SDK.

But if you look at the history of contrib/vscode/README.md in our tree
you'll see that we used to support this "Visual Studio Solution" for
years via GNU make, it probably still works.

The change in 4c2c38e800f (ci: modification of main.yml to use cmake for
vs-build job, 2020-06-26) shows when the CI was switched over to using
cmake instead.

The code to support that is still in-tree as the "vcxproj" target in
"config.mak.uname", which calls out to the ~1k lines of Perl code in
contrib/buildsystems/Generators/*.

I'm not suggesting we go back to that. The question is whether the
trade-off of supporting an entirely separate build system without a GNU
make dependency was worth it.

On the one hand those developing on Windows don't need to install it as
a package, on the other hand we end up spending more developer time in
writing duplicate build logic.

The advantage of cmake is that it knows how to generate all that
VS-integration XML etc., so as soon as it knows how to build Git you get
that for free.

But I think you can get that while not having a "real" cmake recipe, but
just a thin shim for calling out to the Makefile.

Is such a thing a hack? Yes. Is it silly to e.g. build with "ninja" and
really have it just shell out to "make"? Yes.

But it might still be worth it if we judge that the goal of getting that
VS integration is sufficient. And that we're not willing to absorb the
cost of maintaining two distinct build recipes in perpetuity.

  reply	other threads:[~2022-12-06 11:13 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  9:40 What's cooking in git.git (Nov 2022, #07; Tue, 29) Junio C Hamano
2022-11-29 18:59 ` ab/remove--super-prefix and -rc0 (was What's cooking in git.git (Nov 2022, #07; Tue, 29)) Glen Choo
2022-11-30  3:43   ` Junio C Hamano
2022-11-30 18:14     ` Glen Choo
2022-11-30 19:43       ` Ævar Arnfjörð Bjarmason
2022-12-01  5:20         ` Junio C Hamano
2022-12-01 17:44         ` Glen Choo
2022-12-01 21:26           ` Junio C Hamano
2022-11-29 19:08 ` What's cooking in git.git (Nov 2022, #07; Tue, 29) Glen Choo
2022-11-30  3:45   ` Junio C Hamano
2022-11-30 18:08     ` Glen Choo
2022-11-29 21:16 ` ds/bundle-uri-4 (was Re: What's cooking in git.git (Nov 2022, #07; Tue, 29)) Derrick Stolee
2022-12-01 15:06   ` Derrick Stolee
2022-12-02  0:25     ` Junio C Hamano
2022-11-30  9:57 ` ab/cmake-nix-and-ci " Phillip Wood
2022-11-30 10:16   ` Ævar Arnfjörð Bjarmason
2022-12-01 14:23     ` Phillip Wood
2022-12-01 16:39       ` [PATCH] test-lib.sh: discover "git" in subdirs of "contrib/buildsystems/out" Ævar Arnfjörð Bjarmason
2022-12-01 16:48         ` Phillip Wood
2022-12-01 17:13           ` Ævar Arnfjörð Bjarmason
2022-12-01 23:00         ` Junio C Hamano
2022-12-02 15:14           ` Phillip Wood
2022-12-02 16:40             ` Ævar Arnfjörð Bjarmason
2022-12-02 23:10               ` Jeff King
2022-12-03  1:12                 ` Junio C Hamano
2022-12-03  1:41                 ` Ævar Arnfjörð Bjarmason
2022-12-05  9:15                   ` Jeff King
2022-12-05 23:34                   ` Taylor Blau
2022-12-05 23:46                     ` Ævar Arnfjörð Bjarmason
2022-12-06  0:35                       ` Taylor Blau
2022-12-06  1:36                     ` Jeff King
2022-12-06  1:43                       ` Ævar Arnfjörð Bjarmason
2022-12-06  2:05                         ` Jeff King
2022-12-06  2:19                           ` Ævar Arnfjörð Bjarmason
2022-12-06  3:52                             ` Junio C Hamano
2022-12-06  9:54                               ` Phillip Wood
2022-12-06 10:57                                 ` Ævar Arnfjörð Bjarmason [this message]
2022-12-08  9:29                                   ` ab/cmake-nix-and-ci, was " Johannes Schindelin
2022-12-08 11:34                                     ` Ævar Arnfjörð Bjarmason
2022-12-09  3:48                                     ` Junio C Hamano
2022-12-09 13:55                                       ` Ævar Arnfjörð Bjarmason
2022-12-07  1:00                           ` Taylor Blau
2022-11-30 10:02 ` What's cooking in git.git (Nov 2022, #07; Tue, 29) Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=221206.865yeodbtg.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).