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

Re: [PATCH] meson: disable PCRE2 dependency by default

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 14, 2025, 16:58 UTC
Message-ID
<xmqqfreyu2tm.fsf@gitster.g>
In-Reply-To
<ymreouejava2acp3xpvrviffd3bd7cu3wwmi3fadzykkaaubim@25oyqvcfhrda>
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
Show 9 quoted lines
> 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.
Previous: Carlo Marcelo Arenas BelónNext: Carlo Marcelo Arenas Belón
Message 6 of 28 in “meson: disable PCRE2 dependency by default”
  1. meson: disable PCRE2 dependency by defaultCarlo Marcelo Arenas Belón, Jul 12, 2025
  2. brian m. carlsonJul 12, 2025
  3. Carlo ArenasJul 14, 2025
  4. Junio C HamanoJul 14, 2025
  5. Carlo Marcelo Arenas BelónJul 14, 2025
  6. Junio C HamanoJul 14, 2025
  7. meson: disable PCRE2 dependency by default in macOSCarlo Marcelo Arenas Belón, Jul 13, 2025
  8. Junio C HamanoJul 13, 2025
  9. meson: disable PCRE2 dependency by default in macOSCarlo Marcelo Arenas Belón, Jul 13, 2025
  10. Eli SchwartzJul 15, 2025
  11. Patrick SteinhardtJul 15, 2025
  12. Carlo ArenasJul 15, 2025
  13. Patrick SteinhardtJul 15, 2025
  14. Carlo ArenasJul 15, 2025
  15. Eli SchwartzJul 15, 2025
  16. Carlo ArenasJul 15, 2025
  17. Eli SchwartzJul 15, 2025
  18. meson: woraround broken system PCRE2 dependency in macOSCarlo Marcelo Arenas Belón, Jul 15, 2025
  19. Junio C HamanoJul 15, 2025
  20. Eric SunshineJul 15, 2025
  21. meson: work around broken system PCRE2 dependency in macOSCarlo Marcelo Arenas Belón, Jul 16, 2025
  22. Junio C HamanoJul 16, 2025
  23. Junio C HamanoJul 16, 2025
  24. Eli SchwartzJul 16, 2025
  25. Carlo ArenasJul 16, 2025
  26. meson: work around broken system PCRE2 dependency in macOSCarlo Marcelo Arenas Belón, Jul 18, 2025
  27. Junio C HamanoJul 23, 2025
  28. Patrick SteinhardtJul 24, 2025

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.