From: Junio C Hamano <gitster@pobox•com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail•com>
Cc: "brian m. carlson" <sandals@crustytoothpaste•net>, git@vger•kernel.org
Subject: Re: [PATCH] meson: disable PCRE2 dependency by default
Date: Mon, 14 Jul 2025 09:58:29 -0700 [thread overview]
Message-ID: <xmqqfreyu2tm.fsf@gitster.g> (raw)
In-Reply-To: <ymreouejava2acp3xpvrviffd3bd7cu3wwmi3fadzykkaaubim@25oyqvcfhrda> ("Carlo Marcelo Arenas Belón"'s message of "Mon, 14 Jul 2025 09:46:29 -0700")
Carlo Marcelo Arenas Belón <carenas@gmail•com> writes:
> This part was more of a: let's assume that we enable PCRE2 by default
> in the Makefile as well, what is the impact to the libification
> efforts now that there is a chance that libgit will be linked (probably
> statically if using meson) with libpcre2?
>
> Since the plan you mentioned above is still dreamware, wouldn't it be
> better to move all the pcre2 functions out of grep.c, export them back
> to it through a semi private header and convert `git-grep` into a
> standalone binary that might link with pcre2 as needed?
The engineering effort that such a move (and encapsulation of
"grep_pat" that may or may not have pcre enabled) would go quite a
long way and brings us quite a lot close to that "dreamware", I
suspect. So it may not be a bad thing.
But even if you move code out of grep.c to a new "abstracted regcomp
and regexec that may or may not use pcre" source file, "git grep"
would need to run with the code you move to the latter anyway, so
unless your plan for libified "git grep" engine is to make the
library user responsible for supplying their own "abstracted regcomp
and regexec that may or may not use pcre" (and "git grep" brings in
its own in that new file), I do not know it changes the picture all
that much.
Thanks.
next prev parent reply other threads:[~2025-07-14 16:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-12 17:26 [PATCH] meson: disable PCRE2 dependency by default Carlo Marcelo Arenas Belón
2025-07-12 17:51 ` brian m. carlson
2025-07-14 14:00 ` Carlo Arenas
2025-07-14 15:20 ` Junio C Hamano
2025-07-14 16:46 ` Carlo Marcelo Arenas Belón
2025-07-14 16:58 ` Junio C Hamano [this message]
2025-07-13 12:23 ` [PATCH v2] meson: disable PCRE2 dependency by default in macOS Carlo Marcelo Arenas Belón
2025-07-13 15:42 ` Junio C Hamano
2025-07-13 17:48 ` [PATCH v3] " Carlo Marcelo Arenas Belón
2025-07-15 1:55 ` Eli Schwartz
2025-07-15 8:46 ` Patrick Steinhardt
2025-07-15 8:56 ` Carlo Arenas
2025-07-15 10:32 ` Patrick Steinhardt
2025-07-15 12:08 ` Carlo Arenas
2025-07-15 14:14 ` Eli Schwartz
2025-07-15 12:01 ` Carlo Arenas
2025-07-15 14:22 ` Eli Schwartz
2025-07-15 11:44 ` [PATCH v4] meson: woraround broken system PCRE2 dependency " Carlo Marcelo Arenas Belón
2025-07-15 16:48 ` Junio C Hamano
2025-07-15 16:50 ` Eric Sunshine
2025-07-16 19:30 ` [PATCH v5] meson: work around " Carlo Marcelo Arenas Belón
2025-07-16 21:13 ` Junio C Hamano
2025-07-16 21:17 ` Junio C Hamano
2025-07-16 22:10 ` Eli Schwartz
2025-07-16 22:17 ` Carlo Arenas
2025-07-18 17:02 ` [PATCH v6] " Carlo Marcelo Arenas Belón
2025-07-23 22:17 ` Junio C Hamano
2025-07-24 5:28 ` Patrick Steinhardt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqfreyu2tm.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=carenas@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=sandals@crustytoothpaste$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox