git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Liam Breck <liam@networkimprov.net>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: send-email: Net::SMTP::SSL failure
Date: Sat, 10 Jun 2017 01:37:04 +0900	[thread overview]
Message-ID: <xmqqvao55d8v.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACBZZX6AKYA5PmE6Le4cxCTCOOix1ErHyT21C=L83CQBYaN=RQ@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Wed, 7 Jun 2017 19:16:41 +0200")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> I have not looked deeply at this, but the error you're getting means
> "we tried to load it before and failed, and here you are trying
> again".
>
> This is almost definitely due to this line in git-send-email:
>
>         if (eval { require Net::SMTP; 1 }) {
>
> And more generally, this code is all buggy:
>
>     4 matches for "eval.*require" in buffer: git-send-email.perl
>     153:my $have_email_valid = eval { require Email::Valid; 1 };
>     154:my $have_mail_address = eval { require Mail::Address; 1 };
>    1118:        if (eval { require Net::Domain; 1 }) {
>    1129:        if (eval { require Net::SMTP; 1 }) {
>
> Well, "buggy" in the sense that we're just happy-go-lucky trying to
> load these modules, and if they have an error we don't report it, then
> when we try to load them again perl just emits a generic error saying
> you're trying to require() something that already failed somewhere
> before...

Thanks for the discussion.  My short summary from reading the thread
from the sideline is:

 * "eval { require module; 1 }" pattern seems to have spread by
   copying and pasting without thinking, all of which should be
   corrected not to retry;

 * The error OP encountered is not an issue in git-send-email
   per-se, but was made harder to diagnose due to the above.

I think we still lack the definite "here is the right way to fix
these not to retry" patch for application, but anything else I
missed?

      parent reply	other threads:[~2017-06-09 16:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07  5:47 send-email: Net::SMTP::SSL failure Liam Breck
2017-06-07 17:00 ` Liam Breck
2017-06-07 17:16   ` Ævar Arnfjörð Bjarmason
2017-06-07 18:04     ` Liam Breck
2017-06-07 19:30       ` Ævar Arnfjörð Bjarmason
2017-06-07 19:39         ` Liam Breck
2017-06-07 20:43           ` Ævar Arnfjörð Bjarmason
2017-06-07 21:06             ` Liam Breck
2017-06-08  0:06             ` Samuel Lijin
2017-06-08  0:26               ` Liam Breck
2017-06-08  6:28               ` Ævar Arnfjörð Bjarmason
2017-06-09 16:37     ` Junio C Hamano [this message]

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=xmqqvao55d8v.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=liam@networkimprov.net \
    /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).