[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint: Avoid syntax-check failure for empty gnulib submodule

From: Jim Meyering
Subject: Re: [PATCH] maint: Avoid syntax-check failure for empty gnulib submodule.
Date: Mon, 20 Sep 2021 07:36:23 -0700

On Mon, Sep 20, 2021 at 12:49 AM Simon Josefsson via Gnulib discussion
list <bug-gnulib@gnu.org> wrote:
> Hi,
> Some syntax-check rules have a really poor failure mode (it prints all
> source code files to stdout) when the 'gnulib_dir' points to an empty
> git submodule checkout, see for example:
> https://storage.googleapis.com/gitlab-gprd-artifacts/08/35/08352f7ac0f5a870c92a7777a01ca17d0b44be10aff8451893987ed8dbf48231/2021_09_19/1602830917/1729528459/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&GoogleAccessId=gitlab-object-storage-prd@gitlab-production.iam.gserviceaccount.com&Signature=fGIerRoWfE1woQD7hzvDst%2FPa67Kg9u9PjJxMB8vLpFD4DZIPDZNRBcqHQZV%0ARtRNSa2k2Er1W59wYe%2F%2FKY9C95YkIhMCftS5zBXfqsEPkRbU8CwcoG5clQoL%0A4Mpqy6OY1Kx7JUB86qBpYWFKlHLPosw0sscOolAGxcel2oZP1soxHLzxcgo%2B%0A66whawET8QK%2Bkj8FOElVzwVz93T8Qp0uZgvfoT7UVF2O9JGlEofYw7%2BrQm%2Ff%0AXOutkumck4OR17dGXSNaoWPO48Z7tDJLeAjWjnSUm%2F9ZPkYd%2B8IfxaEzACg%2B%0Av%2FS%2ByQpyp6eS1kdiliBmJFmL0Y7JJu7HgZiU21kkyw%3D%3D&Expires=1632123408
> The patch below is not ideal -- consider if you did ./bootstrap --no-git
> with the goal of using GNULIB_SRCDIR but for some reason ALSO did 'git
> submodule update --init', then the syntax-check rules will use the
> submodule checkout instead of the GNULIB_SRCDIR content -- but I believe
> things are better with the patch than without it.
> -gnulib_dir ?= $(shell if test -d $(srcdir)/gnulib; then \
> +gnulib_dir ?= $(shell if test -f $(srcdir)/gnulib/gnulib-tool; then \
>                         echo $(srcdir)/gnulib; \
>                 else \
>                         echo ${GNULIB_SRCDIR}; \

Hi Simon,

Maybe I'm misunderstanding the scenario, but if the gnulib dir is in
an inconsistent state, isn't it more appropriate that syntax-check
rules fail (even if noisily), than maybe-succeed because we pointed
them at another dir that's not even being used yet?

Does it make sense to run "make syntax-check" without first having run
"make"? That latter requires a proper gnulib setup, in my experience.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]