Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB16W-0005O4-Q4 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jul 2022 21:38:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oB16V-0002kO-C9 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Jul 2022 21:38:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB16T-0002jb-NC for pgsql-hackers@lists.postgresql.org; Mon, 11 Jul 2022 21:38:07 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oB16P-0001pK-IT for pgsql-hackers@postgresql.org; Mon, 11 Jul 2022 21:38:05 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 60067320031A; Mon, 11 Jul 2022 17:37:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 11 Jul 2022 17:37:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1657575476; x=1657661876; bh=D8tVSg4KEe JbpDVBRIyGz/8aiT2QG8uwLnhrU82Xdw0=; b=UXxCQV0NsayxfWhzs/gvKb2oB/ Rti9yZOCgjjc5km/kuqF3FjM73jM+LH+uT5fqr2K2+NLt4fsuBnrpRytCZ4AOfoN xdwb0dHuApuX8jKoKXtSHI0+O4IdH5wk4j/C5Z9jUbveg2TuObBGhP9KLhRvf9DG S0emZFcZp/ltOSP8MiIBppJKLyGPHdawSVpcVeUGrOrWEwdKDl8WSEsTaWxWJ8vR BFvUpxAzwjGJV6NawkBNN3sVrGR8GG7HmhV/k+aLksUDcfkrANDTuPugc7IeX046 dQg0tPXdNrGEJwvsG6dGzO7WG3CymgiVEPxOEzy+p6gPtDE97+x5W1bMRZvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1657575476; x=1657661876; bh=D8tVSg4KEeJbpDVBRIyGz/8aiT2Q G8uwLnhrU82Xdw0=; b=xDYK7lhYLEo598RYzpWKSdVAAWPc5LY3TRA1nPmEW68p XehYeceztDezNmLPPSi7gKH94XBBoLVKMHzDrEKArOCXZcLhplxGnFoXjZmOoK56 TSGLR/aSEsvPFutIDgNGBX1s+0PiDTrrLSufG4IZ6bvpx0a/Hz4vS3CjAMLuk1MX le2BWmSeJdVoiNUqWfzcyIHzL3Nu0ZicdIwVvk9slduE8UfNW3Ez3adOaEiDOduG y6yJLmIJYWQFbRyoapVn5pDM8+db9YBNX3b+ExQPWiilHjReUY/K2NpSSralH9w+ yYBJiwMPINn1A4BqjzWgcsHiOfrRjtAzILiZxaLRCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejgecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgvshcu hfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrghtth gvrhhnpedvffefvefhteevffegieetfefhtddvffejvefhueetgeeludehteevudeitedt udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnh gurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Jul 2022 17:37:56 -0400 (EDT) Date: Mon, 11 Jul 2022 14:37:55 -0700 From: Andres Freund To: Tom Lane Cc: Robert Haas , Peter Eisentraut , David Rowley , pgsql-hackers Subject: Re: automatically generating node support functions Message-ID: <20220711213755.gwcysmuypke3wckg@awork3.anarazel.de> References: <11148777-fbe2-5188-195d-48f5083573c5@enterprisedb.com> <20220710214622.haiektrjzisob6rl@awork3.anarazel.de> <815831.1657494597@sss.pgh.pa.us> <45f508cb-e30b-c252-e081-4548deafa34c@enterprisedb.com> <1116889.1657553859@sss.pgh.pa.us> <1201553.1657562258@sss.pgh.pa.us> <1229446.1657569262@sss.pgh.pa.us> <20220711201755.x5hmdailt63z2xo2@awork3.anarazel.de> <1239476.1657571885@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1239476.1657571885@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-07-11 16:38:05 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-07-11 15:54:22 -0400, Tom Lane wrote: > >> We can't simply move the file list into gen_node_support.pl, because > >> (a) the build system has to know about the dependencies involved > > > Meson has builtin support for tools like gen_node_support.pl reporting which > > files they've read and then to use those as dependencies. It'd not be a lot of > > effort to open-code that with make either. > > If you want to provide code for that, sure, but I don't know how to do it. It'd basically be something like a --deps option providing a path to a file (e.g. .deps/nodetags.Po) where the script would emit something roughly equivalent to path/to/nodetags.h: path/to/nodes/nodes.h path/to/nodetags.h: path/to/nodes/primnodes.h ... path/to/readfuncs.c: path/to/nodetags.h It might or might not make sense to output this as one rule instead of multiple ones. I think our existing dependency support would do the rest. We'd still need a dependency on node-support-stamp (or nodetags.h or ...), to trigger the first invocation of gen_node_support.pl. I don't think it's worth worrying about this not working reliably for non --enable-depend builds, there's a lot more broken than this. But it might be a bit annoying to deal with either a) creating the .deps directory even without --enable-depend, or b) specifying --deps only optionally. I can give it a go if this doesn't sound insane. Greetings, Andres Freund