git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Robin H. Johnson" <robbat2@gentoo.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] NO_PERL support
Date: Fri, 3 Apr 2009 16:56:07 -0400	[thread overview]
Message-ID: <20090403205607.GA8152@coredump.intra.peff.net> (raw)
In-Reply-To: <7vocvd8p6s.fsf@gitster.siamese.dyndns.org>

On Fri, Apr 03, 2009 at 01:20:11PM -0700, Junio C Hamano wrote:

> Saying "We support building but not testing" is like saying "we don't
> support it", and honestly, we'd be better off leaving this patch out of
> tree if that is what we are going to do.  Even though I am not personally

Well, there are actually multiple levels that are worth considering. The
tasks you might want to accomplish are:

  1. Build the programs
  2. Run the test suite
  3. Run the programs (excepting the perl ones, of course); note
     that being able to build is not necessarily a prerequisite,
     as you might receive git as a binary package.
  4. Build the documentation
  5. View the documentation

Right now, (1), (2), and (4) are broken without perl. (5) works fine
because it doesn't involve perl at all. (3) works the same, except you
get error messages like "not a git command".

I can think of three situations which are helped by my patch series:

  - You are on a system with no perl. You don't care about running the
    test suite, but you do want to use basic git. You can now build and
    run, with the except of the perl scripts.

  - You are on a system with an old or inferior perl. For example, my
    Solaris test box has perl 5.005, and I know Alex has complained
    about Activestate perl on more than one occasion. The inferior perl
    is generally enough to run the little snippets in the test suite and
    the Documentation Makefile. So you can now build and run git (minus
    the perl bits) and the documentation (in theory -- you don't have
    perl but you _do_ have working asciidoc and xmlto?), and you can run
    the test suite without having to manually skip a bunch of tests
    (which is what I do now).

  - You are a package builder distributing binary packages. You have
    perl, but you want to build a noperl variant. Perl works for
    building the package, but you want the _result_ not to use perl. The
    test scripts, of course, must also respect NO_PERL since you have
    built placeholder scripts instead of the real thing.

> very enthused about NO_PERL, the Makefile patch itself does not look too
> bad, and if we can finish this with very limited injury to the overall
> codebase, I wouldn't mind carrying the option in-tree.

I don't think it is. See my 3/4.

>         Side note: by the way, what did you or Robin's patch do to
>         Documentation/cmd-list.perl and other bits of build infrastructure
>         that rely on Perl?

Neither patch does anything. AFAIK, Documentation/Makefile uses perl,
but nothing else does (aside from the test scripts previously
mentioned).

> To solve the second "no" cleanly, I am wondering if we can do something
> clever by defining $PERL to be used in t/t*.sh scripts.  They should be
> using configured PERL_PATH for running the tests _anyway_, even though I
> see many hits from "git grep -e perl t/" right now.

We can redefine them to use $PERL_PATH (which I agree should be done
anyway), but intercepting there is probably too late. You will be in the
middle of a test, and want to say "Oh wait, I was supposed to skip this
test." Certainly possible, but I think it might make the test code
pretty ugly.

  Aside: I think the reason that the lack of PERL_PATH hasn't been a
  problem is that people are generally not picking a _different_ perl,
  but rather need the whole path to go on the #! line. So the full path
  and "whatever is in my PATH" tend to be the same thing.

> But even if there isn't a room for doing something clever there, I think
> the test prerequisite framework J6t did recently should be usable without
> cluttering the test suite too much.  That forces test authors to be aware
> of NO_PERL, which is slightly yucky, but if it cannot be helped, I think
> we can survive.  We do the same for UTF8 and SYMLINKS already.

See my 4/4, which uses J6t's framework to do the first part (disabling
tests for scripts which we didn't actually build).

A 5/4 might be "disable uses of perl in tests when NO_PERL is set". And
that would be much more invasive. In my scenarios above, it buys the "I
don't have perl at all" people the ability to run a subset of the test
suite (but unlike 4/4, it is skipping tests that are actually useful and
important, but just happen to rely on perl for their infrastructure --
4/4 is by definition skipping tests that have no meaning).

I don't have any Gentoo boxen, but my understanding is that pretty much
everything is built from source. So the "you can make binary packages"
fix doesn't help them that much. OTOH, Robin's current patch doesn't
help that either, so I can only assume they're not really running the
test suite on perl-less systems. And I don't see a reason why upstream
git can't do part of the work (my series), and the Gentoo build can't do
the rest (setting GIT_SKIP_TESTS as appropriate).

-Peff

  reply	other threads:[~2009-04-03 20:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03  7:03 [PATCH] NO_PERL support Robin H. Johnson
2009-04-03 13:20 ` Jeff King
2009-04-03 14:51   ` Johannes Schindelin
2009-04-03 14:53     ` Jeff King
2009-04-03 15:02       ` Johannes Schindelin
2009-04-03 15:11         ` Miklos Vajna
2009-04-03 15:16         ` Jeff King
2009-04-03 17:54   ` Johannes Sixt
2009-04-03 18:37     ` Jeff King
2009-04-03 15:46 ` Jeff King
2009-04-03 15:59   ` Robin H. Johnson
2009-04-03 16:18     ` Jeff King
2009-04-03 16:25 ` Junio C Hamano
2009-04-03 17:15   ` Jeff King
2009-04-03 20:20     ` Junio C Hamano
2009-04-03 20:56       ` Jeff King [this message]
2009-04-03 19:27 ` [PATCH 0/4] " Jeff King
2009-04-03 19:28   ` [PATCH 1/4] commit: abort commit if interactive add failed Jeff King
2009-04-03 19:31   ` [PATCH 2/4] tests: remove exit after test_done call Jeff King
2009-04-03 19:32   ` [PATCH 3/4] Makefile: allow building without perl Jeff King
2009-04-04 22:47     ` Robin H. Johnson
2009-04-04 23:39       ` Jeff King
2009-04-04 23:51         ` Robin H. Johnson
2009-04-04 23:56           ` Jeff King
2009-04-05  0:06             ` Robin H. Johnson
2009-04-07  7:27               ` Jeff King
2009-04-03 19:33   ` [PATCH 4/4] tests: skip perl tests if NO_PERL is defined Jeff King
2009-04-04 23:30     ` Robin H. Johnson
2009-04-04 23:42       ` Jeff King
2009-04-07  7:31   ` [PATCH 0/4] NO_PERL support 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

  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=20090403205607.GA8152@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=robbat2@gentoo.org \
    /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).