From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Toon Claes <toon@iotcl.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/5] t/perf: use configured PERL_PATH
Date: Tue, 15 Apr 2025 12:01:36 +0200 [thread overview]
Message-ID: <Z_4ugEF1iKC5U7Ry@pks.im> (raw)
In-Reply-To: <xmqq5xj6r1mf.fsf@gitster.g>
On Mon, Apr 14, 2025 at 12:20:40PM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> >> > Use "PERL_PATH" to execute Perl scripts, which makes them work on more
> >> > esoteric systems like NixOS.
> >>
> >> I see in `t/perf/README` there's a mention of running `./aggregate.perl`
> >> directly? Shall we inform the user to run that through their Perl as
> >> well?
> >>
> >> - $ ./aggregate.perl . /path/to/other/git ./p0001-rev-list.sh
> >> + $ perl ./aggregate.perl . /path/to/other/git ./p0001-rev-list.sh
>
> Good.
>
> >>
> >> Or do we expect users to know what they are doing when they don't have
> >> Perl installed at /usr/bin/perl?
> >
> > Another solution could be to switch the shebang to `#!/usr/bin/env
> > perl`. We also do this for "t/chainlint.pl".
>
> When you do not have perl installed anywhere, how does this fail? I
> think you would get
>
> $ ./aggregate.perl ...
> /usr/bin/env: 'perl': No such file or directory
>
> and compared to that,
>
> $ perl ./aggregate.perl ...
> bash: perl: command not found
>
> I think it makes it slightly more obvious to those who lack perl on
> their $PATH what is going wrong to explicitly tell them to run
> "perl" like Toon's suggestion above (primarily because use of
> /usr/bin/env is not obvious to those who are told to run
> ./aggregate.perl script).
The counterargument is that `#!/usr/bin/env perl` works on systems where
Perl is in PATH, but in a non-standard location. So isn't it preferable
to make things Just Work(TM) on such systems instead of giving slightly
better error messages on systems where it wouldn't work anyway because
Perl is not available? I certainly think so, but if you or others feel
strongly I'll adapt.
Patrick
next prev parent reply other threads:[~2025-04-15 10:01 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 6:16 [PATCH 0/5] meson: wire up support for benchmarks Patrick Steinhardt
2025-03-31 6:16 ` [PATCH 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-03-31 6:16 ` [PATCH 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-10 11:43 ` Toon Claes
2025-04-14 6:50 ` Patrick Steinhardt
2025-04-14 19:20 ` Junio C Hamano
2025-04-15 10:01 ` Patrick Steinhardt [this message]
2025-03-31 6:16 ` [PATCH 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-10 11:34 ` Toon Claes
2025-04-14 6:28 ` Toon Claes
2025-04-14 6:50 ` Patrick Steinhardt
2025-03-31 6:16 ` [PATCH 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-10 11:44 ` Toon Claes
2025-04-14 6:50 ` Patrick Steinhardt
2025-04-14 9:07 ` Toon Claes
2025-03-31 6:16 ` [PATCH 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 0/5] meson: wire up support for benchmarks Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-20 10:00 ` Christian Couder
2025-04-22 6:51 ` Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-20 10:00 ` Christian Couder
2025-04-14 6:51 ` [PATCH v2 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-15 14:36 ` [PATCH v2 0/5] meson: wire up support for benchmarks Junio C Hamano
2025-04-15 18:18 ` Junio C Hamano
2025-04-16 11:00 ` Patrick Steinhardt
2025-04-18 23:02 ` Junio C Hamano
2025-04-22 6:50 ` [PATCH v3 " Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-22 7:27 ` [PATCH v3 0/5] meson: wire up support for benchmarks Christian Couder
2025-04-22 7:53 ` Patrick Steinhardt
2025-04-23 14:44 ` Christian Couder
2025-04-24 4:31 ` Patrick Steinhardt
2025-04-24 6:28 ` Christian Couder
2025-04-24 11:13 ` Junio C Hamano
2025-04-24 13:49 ` Patrick Steinhardt
2025-04-23 14:12 ` Toon Claes
2025-04-25 7:28 ` [PATCH v4 " Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-25 7:57 ` Christian Couder
2025-04-25 8:01 ` Patrick Steinhardt
2025-04-25 8:09 ` Christian Couder
2025-04-25 8:27 ` Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-25 8:06 ` [PATCH v4 0/5] meson: wire up support for benchmarks Christian Couder
2025-04-25 8:26 ` Patrick Steinhardt
2025-04-25 8:33 ` Christian Couder
2025-04-28 7:30 ` [PATCH v5 " Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 5/5] meson: wire up benchmarking options Patrick Steinhardt
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=Z_4ugEF1iKC5U7Ry@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=toon@iotcl.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.
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 NNTP newsgroup(s).