git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Adam <thomas@xteddy.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Matthieu Moy <Matthieu.Moy@univ-lyon1.fr>,
	Junio C Hamano <gitster@pobox.com>,
	Thomas Adam <thomas@xteddy.org>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Git List <git@vger.kernel.org>,
	Matthieu Moy <Matthieu.Moy@imag.fr>,
	Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
Subject: Re: [PATCH] git-send-email: fix get_maintainer.pl regression
Date: Wed, 22 Nov 2017 09:49:46 +0000	[thread overview]
Message-ID: <20171122094945.2xgvzcdfom3yatpd@laptop> (raw)
In-Reply-To: <87vai2wumy.fsf@linaro.org>

On Wed, Nov 22, 2017 at 09:05:41AM +0000, Alex Bennée wrote:
> 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 let us concentrate just on git-send-email.perl for now.  In the
Module::Extract::Use module (which happens to be what corelist uses), there's
an example script called 'extract_modules' which will statically analyse a
perl file and tell you the following information:

% perl extract_modules ./git-send-email.perl
Modules required by ./git-send-email.perl:
- Authen::SASL
- Cwd (first released with Perl 5)
- Email::Valid
- Error
- File::Spec::Functions (first released with Perl 5.00504)
- File::Temp (first released with Perl 5.006001)
- Getopt::Long (first released with Perl 5)
- Git
- Git::I18N
- IO::Socket::SSL
- MIME::Base64 (first released with Perl 5.007003)
- MIME::QuotedPrint (first released with Perl 5.007003)
- Net::Domain (first released with Perl 5.007003)
- Net::SMTP (first released with Perl 5.007003)
- Net::SMTP::SSL
- POSIX (first released with Perl 5)
- Sys::Hostname (first released with Perl 5)
- Term::ANSIColor (first released with Perl 5.006)
- Term::ReadLine (first released with Perl 5.002)
- Text::ParseWords (first released with Perl 5)
- strict (first released with Perl 5)
- warnings (first released with Perl 5.006)

Therefore, we have the following modules which are not standard:

- Email::Valid
- Error
- Git
- Git::I18N
- IO::Socket::SSL
- NET::SMTP::SSL

Looking at the code for git-send-email.perl, it seems most of those are
eval()d at the point they're needed, which seems in many cases to be fallback
responses to something we've written, or a means of ensuring we don't need to
explicitly handle the case of it not being present at run-time.

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

This seems like a slight on ensuring a running script which may or may not
have additional functionality depending on which modules are installed.  Given
the pretty good state of packaging across those platforms which Git runs on, I
would argue we're now in a much better position to explicitly check for
non-core modules at BEGIN{} time, and moan loudly if they're not installed.

-- Thomas Adam

  reply	other threads:[~2017-11-22  9:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 15:48 [PATCH] git-send-email: fix get_maintainer.pl regression Alex Bennée
2017-11-16 16:46 ` Alex Bennée
2017-11-19  2:54 ` Eric Sunshine
2017-11-20 10:44   ` Alex Bennée
2017-11-20 22:34     ` Eric Sunshine
2017-11-20 18:57   ` Eric Sunshine
2017-11-21  0:07     ` Philip Oakley
2017-11-21  0:30       ` Eric Sunshine
2017-11-21  0:32     ` Junio C Hamano
2017-11-20 22:14 ` Eric Sunshine
2017-11-21 20:46   ` Alex Bennée
2017-11-21 20:52     ` Thomas Adam
2017-11-22  1:34       ` Junio C Hamano
2017-12-11 17:13         ` Alex Bennée
2017-12-11 17:26           ` Thomas Adam
2017-12-11 19:46             ` Ævar Arnfjörð Bjarmason
2017-12-12 10:30               ` Thomas Adam
2017-12-12 11:49                 ` Ævar Arnfjörð Bjarmason
2017-12-12 16:40                 ` Alex Bennée
2017-12-12 18:14                   ` Ævar Arnfjörð Bjarmason
2017-12-12 19:35                     ` Junio C Hamano
2017-12-12 21:25                       ` Ævar Arnfjörð Bjarmason
2017-12-12 22:19                         ` Junio C Hamano
     [not found]       ` <b131cc195280498ea3a77a37eff8444e@BPMBX2013-01.univ-lyon1.fr>
2017-11-22  8:22         ` Matthieu Moy
2017-11-22  9:05           ` Alex Bennée
2017-11-22  9:49             ` Thomas Adam [this message]
2017-11-22 10:44           ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171122094945.2xgvzcdfom3yatpd@laptop \
    --to=thomas@xteddy.org \
    --cc=Matthieu.Moy@imag.fr \
    --cc=Matthieu.Moy@univ-lyon1.fr \
    --cc=alex.bennee@linaro.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=remi.lespinet@ensimag.grenoble-inp.fr \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).