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

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

From
Alex Bennée <alex.bennee@linaro.org>
Date
Nov 22, 2017, 09:05 UTC
Message-ID
<87vai2wumy.fsf@linaro.org>
In-Reply-To
<q7h97euiradu.fsf@orange.lip.ens-lyon.fr>
Matthieu Moy <Matthieu.Moy@univ-lyon1.fr> writes:
Show 25 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Was there any reason why Mail::Address was _inadequate_?
>
> I think the main reason was that Mail::Address is not a standard perl
> module, and not relying on it avoided one external dependency. AFAIK, we
> don't really have a good way to deal with Perl dependencies, so having a
> strong requirement on Mail::Address will probably end up in a runtime
> error for users who compile Git from source (people using a packaged
> version have their package manager to deal with this).
>
>> I know we had trouble with random garbage that are *not* addresses
>> people put on the in-body CC: trailer in the past, but I do not recall
>> if they are something Mail::Address would give worse result and we
>> need our workaround (hence our own substitute), or Mail::Address would
>> handle them just fine.
>
> For a long time, we used Mail::Address if it was available and I don't
> think we had issues with it.
>
> My point in cc907506 ("send-email: don't use Mail::Address, even if
> available", 2017-08-23) was not that Mail::Address was bad, but that
> changing our behavior depending on whether it was there or not was
> really bad. For example, the issue dealt with in this thread probably
> always existed, but it was present only for *some* users.

So I just did a little digging on my systems to illustrate the point. My work machine is Ubuntu, so has a packaged git via PPA. It depends on libmailtools-perl which includes the perl module and:

  apt-cache rdepends  libmailtools-perl | wc -l
  45

So for binary packaged systems it's not a big thing - libmailtools-perl seems to be quite widely relied on.

On my system at home, running Gentoo, while requiring "perl" doesn't explicitly pull in the Mail::Address dependency. As a result the git send-email stanza I was running at work manages to corrupt the addresses. If I manually install dev-perl/MailTools of course it silently starts working again.

Good job I never usually send patches from my home machine ;-)
My hacky guess about GIT's perl use calls is:
   find . -iname "*.perl" -or -iname "*.pm" -or -iname "*.pl" | xargs grep -h  "use .*::" | sort | uniq | wc -l
   88

So that is about 88 perl modules used in the code base. How many of them are not part of the core perl distribution?

Should the solution be to just make Mail::Address a hard dependency and not have the fallback?

-- Alex Bennée

Previous: Matthieu MoyNext: Thomas Adam
Message 25 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.