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

Re: [PATCH] git-send-email: fix get_maintainer.pl regression

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 12, 2017, 18:14 UTC
Message-ID
<87fu8fddam.fsf@evledraar.gmail.com>
In-Reply-To
<87indb99xy.fsf@linaro.org>
On Tue, Dec 12 2017, Alex Bennée jotted:
Show 28 quoted lines
> Thomas Adam <thomas@xteddy.org> writes:
>
>> Hi,
>>
>> On Mon, Dec 11, 2017 at 08:46:46PM +0100, Ævar Arnfjörð Bjarmason wrote:
>>> I.e. we'd just ship a copy of Email::Valid and Mail::Address in
>>> perl/Git/FromCPAN/, use a wrapper to load them, and then we wouldn't
>>> need to if/else this at the code level, just always use the module,
>>> and it would work even on core perl.
>>
>> I disagree with the premise of this, Ævar.  As soon as you go down this route,
>> it increases maintenance to ensure we keep up to date with what's on CPAN for
>> a tiny edge-case which I don't believe exists.
>>
>> You may as well just use App::FatPacker.
>>
>> We're talking about package maintenance here -- and as I said before, there's
>> plenty of it around.  For those distributions which ship Git (and hence also
>> package git-send-email), the dependencies are already there, too.  I just
>> cannot see this being a problem in relying on non-core perl modules.  Every
>> perl program does this, and they don't go down this route of having copies of
>> various CPAN modules just in case.  So why should we?  We're not a special
>> snowflake.
>
> I less bothered my the potentially shipping a git specific copy than
> ensuring the packagers pick up the dependency when they do their builds.
> Do we already have a mechanism for testing for non-core perl modules
> during the "configure" phase of git?
Current git.git master does two things:
 * For Error.pm we test at build time. See `git grep Error --
   'perl/Make*'`. If you don't have Error.pm when you build we'll ship
   an old copy of it, and use that forever even if it's installed from
   CPAN afterwards.
 * For Mail::Address, Net::Domain etc. we don't ship the CPAN module,
   but some fallback code. We test at runtime, see `git grep
   eval.*require`. If you install the package from CPAN we'll start
   using it at your next invocation.

My "Makefile: replace perl/Makefile.PL with simple make rules" currently cooking in pu changes that so that:

 * We always at runtime test for the system CPAN module.
 * In the case of Error.pm we happen to ship a fallback, in the case of
   Mail::Address etc. we don't and have fallback code, but we could also
   just ship a copy and remove the fallback code.

This makes more sense, we always "dynamically link" as it were, we'll just change the target to (a presumably newer) system module in the case of Error.pm if it's found on the system, otherwise use our fallback.

Previous: Alex BennéeNext: Junio C Hamano
Message 20 of 27 in “git-send-email: fix get_maintainer.pl regression”
  1. git-send-email: fix get_maintainer.pl regressionAlex Bennée, Nov 16, 2017
  2. Alex BennéeNov 16, 2017
  3. Eric SunshineNov 19, 2017
  4. Alex BennéeNov 20, 2017
  5. Eric SunshineNov 20, 2017
  6. Eric SunshineNov 20, 2017
  7. Philip OakleyNov 21, 2017
  8. Eric SunshineNov 21, 2017
  9. Junio C HamanoNov 21, 2017
  10. Eric SunshineNov 20, 2017
  11. Alex BennéeNov 21, 2017
  12. Thomas AdamNov 21, 2017
  13. Junio C HamanoNov 22, 2017
  14. Alex BennéeDec 11, 2017
  15. Thomas AdamDec 11, 2017
  16. Ævar Arnfjörð BjarmasonDec 11, 2017
  17. Thomas AdamDec 12, 2017
  18. Ævar Arnfjörð BjarmasonDec 12, 2017
  19. Alex BennéeDec 12, 2017
  20. Ævar Arnfjörð BjarmasonDec 12, 2017
  21. Junio C HamanoDec 12, 2017
  22. Ævar Arnfjörð BjarmasonDec 12, 2017
  23. Junio C HamanoDec 12, 2017
  24. Matthieu MoyNov 22, 2017
  25. Alex BennéeNov 22, 2017
  26. Thomas AdamNov 22, 2017
  27. Junio C HamanoNov 22, 2017

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.