All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Todd Zullinger <tmz@pobox.com>
Cc: "Michael Strawbridge" <michael.strawbridge@amd.com>,
	"Jeff King" <peff@peff.net>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Luben Tuikov" <luben.tuikov@amd.com>,
	git@vger.kernel.org, entwicklung@pengutronix.de
Subject: Re: Regression: git send-email fails with "Use of uninitialized value $address" + "unable to extract a valid address"
Date: Sat, 28 Oct 2023 00:44:15 +0900	[thread overview]
Message-ID: <xmqqedhgoysw.fsf@gitster.g> (raw)
In-Reply-To: <ZTp7xvXDw1GF-NUB@pobox.com> (Todd Zullinger's message of "Thu, 26 Oct 2023 10:46:30 -0400")

Todd Zullinger <tmz@pobox.com> writes:

> Alternately, perhaps having Email::Valid as an optional
> dependency is worth reconsidering. If it's truly important
> to validation, make it a requirement.  If it's not, then
> drop it to simplify the code and avoid these sort of issues.

Reducing the possible "valid" configurations we support is a very
tempting proposition.

> If I make the git package require it to ensure consistent
> behavior then some folks will -quite rightly- complain that
> it should not be a requirement.  If I keep it an optional
> dependency, then debugging becomes more difficult for the
> reasons we've seen in these recent (and not-so-recent)
> threads.

Very true.

> I'd lean toward dropping the dependency entirely and leave
> the more basic validation of git-send-email in place.  That
> may not catch every type of address error, but I would argue
> that what we do without Email::Valid is perfectly reasonable
> for checking basic email address syntax sanity.

Yes, it is very tempting, and given that we have to keep our
fallback codepath working for those without Email::Valid ANYWAY,
as long as the dependency is merely optional, I very much agree
with your argument here.

> On a related note, one issue¹ we had reported in Fedora
> after making Email::Valid a requirement was that it rejected
> messages where the local part was too long, per the relevant
> RFC's.  But these were generated addresses from GitLab.  The
> addresses worked in practice.  While Email::Valid was
> technically correct in rejecting such addresses, it didn't
> improve the experience of git send-email users.

I am of two minds here.  I can sympathize with both positions.

 - Trying to be strict to what we send out to the world by using
   Email::Valid that tries to be more RFC kosher matches "be strict
   in what you send out, be lenient in what you receive" mantra

 - Rejecting what works in practice and in real world tend to help
   users.

If we require Email::Valid, then sriking the balance between the
above two will entirely become the responsibility of them; any
end-user who complains "the validation is overly strict" will get
"talk to authors of Email::Valid".

If we ditch Email::Valid, it will become _our_ responsibility, which
means a bit of extra maintenance burden to this project.  But perhaps
it is worth it?  I dunno.

Having Email::Valid as an optional dependency does not place us in a
position better than either of these two, so from that point of view,
too, I like your "we should either make it required or unused, not
an optional dependency" very much.

Thanks.

  reply	other threads:[~2023-10-27 15:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 14:14 Regression: git send-email fails with "Use of uninitialized value $address" + "unable to extract a valid address" Uwe Kleine-König
2023-10-13 15:07 ` Kristoffer Haugsbakk
2023-10-20 10:04 ` Uwe Kleine-König
2023-10-20 21:06   ` Michael Strawbridge
2023-10-24 13:00     ` Uwe Kleine-König
2023-10-24 19:00       ` Michael Strawbridge
2023-10-24 20:43         ` Uwe Kleine-König
2023-10-25  7:21           ` Jeff King
2023-10-25  7:40             ` Uwe Kleine-König
2023-10-26 12:41             ` Junio C Hamano
2023-10-26 13:07               ` Michael Strawbridge
2023-10-26 14:46                 ` Todd Zullinger
2023-10-27 15:44                   ` Junio C Hamano [this message]
2023-10-30  9:29                   ` Jeff King

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

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

  git send-email \
    --in-reply-to=xmqqedhgoysw.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=entwicklung@pengutronix.de \
    --cc=git@vger.kernel.org \
    --cc=luben.tuikov@amd.com \
    --cc=michael.strawbridge@amd.com \
    --cc=peff@peff.net \
    --cc=tmz@pobox.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.