GNU bug report logs - #70557
Fix compilation of Vala files conditionally added to _SOURCES

Previous Next

Package: automake;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Wed, 24 Apr 2024 20:59:06 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Reuben Thomas <rrt <at> sc3d.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 70557 <at> debbugs.gnu.org
Subject: bug#70557: Fix compilation of Vala files conditionally added to _SOURCES
Date: Mon, 29 Apr 2024 00:06:31 +0200
[Message part 1 (text/plain, inline)]
On Sat, 27 Apr 2024 at 20:36, Reuben Thomas <rrt <at> sc3d.org> wrote:

> On Sat, 27 Apr 2024 at 00:53, Karl Berry <karl <at> freefriends.org> wrote:
>
>> Reuben, any chance you can whomp up a test for this patch?
>>
>
> No problem, I will do this when I can find a moment. Since I don't
> actually need this fix after all, it may not be quick!
>

I found a moment, but not a fix. In fact, a fix is not in general possible
(or at least, not without a considerable amount of messing around). The
problem is that the Vala compiler needs to be able to see all the symbols
in the program, so you have to give it all the source files at once, so you
can't give it source files that contain alternative (duplicate) definitions
of the same symbol.

Hence, having conditionally-added sources like this is not compatible with
shipping all C sources in the tarball, or to put it another way, with
making the Vala compiler optional. But I think this is a great feature of
Automake's Vala support! (Certainly, I believe it is unique.)

So if Automake had in future a mode where it shipped only Vala sources,
then in that mode it would make sense to conditionally-include Vala
sources, and that would work.

As a consolation, I attach another patch that fixes some English in
comments in one of the Vala tests.

I guess it is worth documenting this limitation of the current Vala
support. If you agree with my reasoning above, then I will prepare a
documentation patch based on it.

-- 
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
[0002-vala-fix-some-English-in-test-comments.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.