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 1q7geD-0000ct-R7 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 18:15:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7geC-0006fB-Av for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 18:15:40 +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 1q7geC-0006VI-0S for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 18:15:40 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q7ge2-001GLO-UL for pgsql-hackers@postgresql.org; Fri, 09 Jun 2023 18:15:37 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-19f22575d89so802573fac.0 for ; Fri, 09 Jun 2023 11:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon-tech.20221208.gappssmtp.com; s=20221208; t=1686334529; x=1688926529; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YoPhpOWw6YApWE6rnwy6buwJHgg7pwWPqOLxw6V0cck=; b=srQ7VHFBVlTRlwXj9qTgU66ZbV8xSb54aLej0D4CyoqsfI8gIOvSR9QK/PQS8Y+7Zz BejZWDUJ6D0Z5+NV1ducmeKdKol2MtGG79WARHQbk008RSMzsG9EYQEusLgmaz2eUZ3c G+6hBCXI+f3WXukLsY3F4cD/0Sj40KsBWsX987amyXM9kj0of//FH2WWUBKk/pAlNKQ8 hC6UBPlLUae3Tif0dmAlNxySdW/KZ/MJuP8vkW1di1pIG1pkSKm13BjfdY/YCpBuA4VM V5TeSZbLAf3JmyzzFXuUUiaLffEquMbqCa2BGQpdsLEAbYbgmhIbav+ASA0g1WVZ0RE1 xpqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686334529; x=1688926529; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YoPhpOWw6YApWE6rnwy6buwJHgg7pwWPqOLxw6V0cck=; b=UcUEzDj/0EnDRmJ9eJ/S+dVklsfomgFKYvcK8ZuPP1sagkTKZFQj8M5mkH463l4klW X03bUAoJmGTvKRIdFiiIYRd50EHsjk3mi3IsBNxWJrxaww/2BLME68QyC6SMbAD8XqEu rLluhbDonKlJevn3BKQxkn4PVyuAjQ3Lfmbb89CJA+IlVCc8+a+PkTR+NFsoQ6l+qkb6 dDuSyrTBV0FDQ0dDl9U3AZBIfVwy8YFVz4XEjE77RJnjlJdgeIGoJ3hl696tI1t4bPIY gakL7SSp2v81XMAXsBg+0cNnWPc4bluFQZUK5T2Vh+MezgT/fKp09jRZJ3UpMqcUhCHP 8oMQ== X-Gm-Message-State: AC+VfDx3Y8zL/ZiptDrkIXc2Wxg944s/aSTsfcy+eJP9KQfuHnFj88rZ M4qvBHP2LgbZVtglIZF4RNHnpVFdkmMDOCmGRUc= X-Google-Smtp-Source: ACHHUZ5GwLQVna2vdCuL7pX6Oq3YrDf738ASSVlxs+x3hUP3jgI/k9IB9BUAtnVUdL/8HqwbF0hzPQ== X-Received: by 2002:a05:6870:a455:b0:17a:d44e:81b3 with SMTP id n21-20020a056870a45500b0017ad44e81b3mr1450950oal.55.1686334529112; Fri, 09 Jun 2023 11:15:29 -0700 (PDT) Received: from localhost ([2607:fb90:e696:c1dc:3996:e070:71ee:42fb]) by smtp.gmail.com with ESMTPSA id o36-20020a05687096a400b001a2d9188bffsm2465197oaq.46.2023.06.09.11.15.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jun 2023 11:15:28 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 09 Jun 2023 13:15:27 -0500 Message-Id: Cc: Subject: Re: Meson build updates To: "Andres Freund" From: "Tristan Partin" X-Mailer: aerc 0.15.2-33-gedd4752268b2 References: <20230609164135.77fjwqkqzdxfs3f5@awork3.anarazel.de> In-Reply-To: <20230609164135.77fjwqkqzdxfs3f5@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri Jun 9, 2023 at 11:41 AM CDT, Andres Freund wrote: > Hi, > > On 2023-05-18 10:36:59 -0500, Tristan Partin wrote: > > From b35ecb2c8dcd71608f98af1e0ec19d965099ceab Mon Sep 17 00:00:00 2001 > > From: Tristan Partin > > Date: Wed, 17 May 2023 09:40:02 -0500 > > Subject: [PATCH postgres v1 12/17] Make finding pkg-config(python3) mor= e > > robust > >=20 > > It is a possibility that the installation can't be found. Checking for > > Python.h is redundant with what Meson does internally. > > That's not what I saw - we had cases where Python.h was missing, but the > python dependency was found. It's possible that this is dependent on the > meson version. Eli corrected me on this. Please see version 2 of the patchset. > > > From 47394ffd113d4170e955bc033841cb7e18fd3ac4 Mon Sep 17 00:00:00 2001 > > From: Tristan Partin > > Date: Wed, 17 May 2023 09:44:49 -0500 > > Subject: [PATCH postgres v1 14/17] Reduce branching on Meson version > >=20 > > This code had a branch depending on Meson version. Instead, we can just > > move the system checks to the if statement. I believe this also keeps > > selinux and systemd from being looked for on non-Linux systems when > > using Meson < 0.59. Before they would be checked, but obviously fail. > > I like the current version better - depending on the meson version makes = it > easy to find what needs to be removed when we upgrade the meson minimum > version. I think the savings of not looking up selinux/systemd on non-Linux systems is pretty big. Would you accept a change of something like: if meson.version().version_compare('>=3D0.59') # do old stuff else if host_system =3D=3D 'linux' # do new stuff endif Otherwise, I am happy to remove the patch. > > From 189d3ac3d5593ce3e475813e4830a29bb4e96f70 Mon Sep 17 00:00:00 2001 > > From: Tristan Partin > > Date: Wed, 17 May 2023 10:36:52 -0500 > > Subject: [PATCH postgres v1 16/17] Add Meson overrides > >=20 > > Meson has the ability to do transparent overrides when projects are use= d > > as subprojects. For instance, say I am building a Postgres extension. I > > can define Postgres to be a subproject of my extension given the > > following wrap file: > >=20 > > [wrap-git] > > url =3D https://git.postgresql.org/git/postgresql.git > > revision =3D master > > depth =3D 1 > >=20 > > [provide] > > dependency_names =3D libpq > >=20 > > Then in my extension (root project), I can have the following line > > snippet: > >=20 > > libpq =3D dependency('libpq') > >=20 > > This will tell Meson to transparently compile libpq prior to it > > compiling my extension (because I depend on libpq) if libpq isn't found > > on the host system. > >=20 > > I have also added overrides for the various public-facing exectuables. > > Though I don't expect them to get much usage, might as well go ahead an= d > > override them. They can be used by adding the following line to the > > aforementioned wrap file: > > I think adding more boilerplate to all these places does have some cost. = So > I'm not really convinced this is worth doign. Could you explain more about what costs you foresee? I thought this was a pretty free change :). Most of the meson.build files seems to be pretty much copy/pastes of each other, so if a new executable came around, then someone would just get the override line for essentially free, minus changing the binary name/executable name. > > From 5ee13f09e4101904dbc9887bd4844eb5f1cb4fea Mon Sep 17 00:00:00 2001 > > From: Tristan Partin > > Date: Wed, 17 May 2023 10:54:53 -0500 > > Subject: [PATCH postgres v1 17/17] Remove Meson program options for spe= cifying > > paths > >=20 > > Meson has a built-in way to override paths without polluting project > > build options called machine files. > > I think meson machine files are just about unusable. For one, you can't > actually change any of the options without creating a new build dir. For > another, it's not something that easily can be done on the commandline. > > So I really don't want to remove these options. I felt like this would be the most controversial change. What could be done in upstream Meson to make this a more enjoyable experience? I do however disagree with the usability of machine files. Could you add a little context about what you find unusable about them? Happy to revert the change after continuing the discussion, of course. --=20 Tristan Partin Neon (https://neon.tech)