git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: contrib/bazel interest check

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 5, 2026, 22:43 UTC
Message-ID
<aVw-l-vi4PegDhY3@fruit.crustytoothpaste.net>
In-Reply-To
<CAL3xRKfeij_3OUzVPv6Mr4bXjwkB_m7DZt6cbisL-VD473QLpQ@mail.gmail.com>
On 2026-01-05 at 15:34:45, Son Luong Ngoc wrote:
Show 22 quoted lines
>   Hi folks,
> 
>   For my personal use case, I have bootstrapped building libgit and git
>   using Bazel, an open-sourced build tool by Google (1).  Currently, the
>   code is squashed into a giant commit (2) in my repo at
>   github.com/sluongng/git in the branch sluongng/next-bazel.  The commit
>   is based on the 'next' branch from upstream.
> 
>   Similar to Meson, Bazel requires fine-grained BUILD files to be
>   sprinkled throughout the repo.  So it's fairly invasive to try to get
>   this merged.
> 
>   I also won't have the capacity to maintain this setup for every new
>   upstream topic that comes up.  Though I am willing to spend the effort
>   to maintain it for major releases.
> 
>   I want to send this as an interest check to see if there are folks who
>   are willing to co-maintain this with me in-tree style inside git.git.
>   Otherwise, I plan to send this to the Bazel Central Registry (3), the
>   public package registry for the Bazel ecosystem, in overlay mode.  The
>   overlay shall be applied on top of the checkout copy before Bazel
>   starts the build.

We already have two officially supported build systems (Make and Meson), plus CMake in contrib. I don't think adding a fourth build system would be a good idea, especially since it's already burdensome enough to deal with the main two.

I'd also like to encourage you not to send this as-is to the Bazel Central Registry, since it hard-codes various values that are intended to be configurable, such as `SHELL_PATH`[0], `PERL_PATH`, and `PYTHON_PATH`. It also hard-codes a variety of define values which are not necessarily correct for all systems (for instance, my Debian unstable system _does_ have `strlcpy`). Shipping a build system like this would be a regression in functionality and result in broken packages on a variety of systems[1]. If you're suggesting to the public that this is an appropriate way to build Git in general, it would be nice if it were no less functional and flexible than our existing build system.

[0] For instance, I set `SHELL_PATH` to test building and running Git against zsh from time to time. [1] As an example, this would not work correctly on the version of Git a previous employer ships because they ship their own version of Perl and Python that should be used instead of the system one.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Son Luong NgocNext: Son Luong Ngoc
Message 2 of 3 in “contrib/bazel interest check”
  1. Son Luong NgocJan 5, 2026
  2. brian m. carlsonJan 5, 2026
  3. Son Luong NgocJan 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.