From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oF0iDRJIRGFkiwAAgWs5BA (envelope-from ) for ; Fri, 17 Sep 2021 09:47:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2IjXCBJIRGHADQAA1q6Kng (envelope-from ) for ; Fri, 17 Sep 2021 07:47:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5FCE69307 for ; Fri, 17 Sep 2021 09:47:29 +0200 (CEST) Received: from localhost ([::1]:32990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mR8am-0000vt-Do for larch@yhetil.org; Fri, 17 Sep 2021 03:47:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR8aM-0000ve-Ch for guix-patches@gnu.org; Fri, 17 Sep 2021 03:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mR8aM-0001LK-4m for guix-patches@gnu.org; Fri, 17 Sep 2021 03:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mR8aL-0000rc-Tc for guix-patches@gnu.org; Fri, 17 Sep 2021 03:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50627] [PATCH 0/2] Make wayland-protocols dependency native-input. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Sep 2021 07:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50627 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: muradm Cc: 50627@debbugs.gnu.org Received: via spool by 50627-submit@debbugs.gnu.org id=B50627.16318647733257 (code B ref 50627); Fri, 17 Sep 2021 07:47:01 +0000 Received: (at 50627) by debbugs.gnu.org; 17 Sep 2021 07:46:13 +0000 Received: from localhost ([127.0.0.1]:58368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR8ZY-0000qT-QF for submit@debbugs.gnu.org; Fri, 17 Sep 2021 03:46:13 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR8ZU-0000q6-5i for 50627@debbugs.gnu.org; Fri, 17 Sep 2021 03:46:10 -0400 Received: by mail-wm1-f66.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so7004968wmh.1 for <50627@debbugs.gnu.org>; Fri, 17 Sep 2021 00:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=Gh8Qj5H4+jlvDf0z2Z2JS9DkD41yunKHwxqaHwJSuFA=; b=VRsB8bk3x9weLImh26ECZ0IEuEzwrAHHZ1+n0lII7qFc28tOjS76u4kjlyZeLxzdmx QVjvuJCfkzbiM+6pB7zBWVy8jLcgo5h7HcDZ9JzrgG6sYI2beebQUpvVT23felyz236l SbynV3uertD8PxxA9bWhcPz5xfizkYALEvoWzvzVV0+NGKawOlp520NJ7dyUmRMSEvFF BtreL5XAIhpo6puNNQRNfgikUwlhSSdJEBgn3Jht0jggSlPzCK2KyS+M1eYBdYRZcQLS IBir0aix+pSYmQ/U5dtOsV6tvFdDO7QLRKx2obVrKEfl/vHOZQ5WKPlVFp5ThAvrj9Mb KOPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Gh8Qj5H4+jlvDf0z2Z2JS9DkD41yunKHwxqaHwJSuFA=; b=N07+8FSOMVK5qLCpGv7ezwtmbUhsmGiFR5g9UW19gxnWCqFk01y0j24sjXfjgoXC2X 4U79GFI2xKjvQSADEbzIVMDRz//XfPGYSRuu8qsessj4vb0il66osRpqM509Vfh+WK6H 4pG2jpMMPLqiSKyiLJ1upQBCxCetAp2+aMrRdPIKHHI38TLjn6pxroybI1izKDhT1sxB IFTH6rvlx3yrTnV7WeMATqHXWr2p6mRsPKX9qYFgrpxrIMgYO9pG0v/p1UkbmztTM5iM 0XRA+ea2qmTYlTEUUxXDNKi78u3zeH5cTcjfME1zK+q9f9DSnL1FOKPUM6PrcKZEFRuc Lzwg== X-Gm-Message-State: AOAM530bLeRnLH5whjidCqKd2HWTxg0pv9zNXk53H0nF0PsjFZ/4tqdH qs7E5vd92zzD3pL9JiSIcF4= X-Google-Smtp-Source: ABdhPJyK3Lurt2gCqV6XltQ534WCPAPgnDtpQIPZcDlFiS+7frbiG4IHVf9c26oxWnPy7gYOPGrNlw== X-Received: by 2002:a1c:a747:: with SMTP id q68mr8920551wme.180.1631864761977; Fri, 17 Sep 2021 00:46:01 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id c185sm5020634wma.8.2021.09.17.00.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 00:46:01 -0700 (PDT) Message-ID: <4bb63f130f3ec7dac628a8139c405cdc202412e9.camel@gmail.com> From: Liliana Marie Prikler Date: Fri, 17 Sep 2021 09:46:00 +0200 In-Reply-To: <87ilyzg96v.fsf@muradm.net> References: <20210916192331.29606-1-mail@muradm.net> <87ilyzg96v.fsf@muradm.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631864849; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Gh8Qj5H4+jlvDf0z2Z2JS9DkD41yunKHwxqaHwJSuFA=; b=krxheRkBNa+vpYvkZ57sV4puF6xtYbXOOW4XlFHV+VT+FJFzgAZ/BT5a/vkHYZqQzBxq+Y Q1jPwfkh9+7r49R5lvkMtrzn+FiYjIdfbcftGZzV4AU+HOkAX1v+2DxVWFVF0gGE7yGY8o pGhMUZkfFlIW0q8AJMsm2lzH+138KLNXb7VaQ9YtW/7yvPNN+CL+rNbHiHyy2GiBlMCjS2 oc2JXxCzF94TO4J0MRUy79VqireArJ+JxJXAW3nNAOyiivMWSEgK4feyvL5VtexHlESedM 7Z0eARWKxDcWZOLM9cwZqvRutzZ4k1YSn9EQjUYaM0nfujX/nwX/cPjhqNT2pg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631864849; a=rsa-sha256; cv=none; b=spMfCmw3Hh4k+x9jxEnzA6wOVoA3foZW4UJpwqvutHdsLObF4lw4qPdknk//DvdtxXR4A8 vCLxHXLqCu6v2jvJTJHO9jlR2j+bLGBMpfDo+1TbRyi3eXKWEQ4O5pY9WdLx5W8n9vDBSf 6P0NkV6FN0ONdT15Kg6GaFx3D5Flwx44k53SGKZ1Efe6hhZkHbKi7cEFB/c4cq9nXx9xr5 Jis8Z46v+m08e63C+jZw0iNinrcvNa7TodT9LZvdBhm45pdMsSC/lNHLVdhhIbREB1F10f jVrxjjErz5Z1PA10o34fuGSm0vgDvpHn8CvW6LuSi/4l3y12S7VscAy1cpzcqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VRsB8bk3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VRsB8bk3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5FCE69307 X-Spam-Score: -1.30 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4tiY7GBaMTr5 Hi Am Freitag, den 17.09.2021, 05:35 +0300 schrieb muradm: > Liliana Marie Prikler writes: > > > Hi, > > > > Am Donnerstag, den 16.09.2021, 22:23 +0300 schrieb muradm: > > > wayland-protocols is not runtime dependency and only build time > > > dependency for applications that directly using wayland. > > Guix does not distinguish between "build time" and run time > > dependencies. > True, here issue could be related to miss wording, but same > wording is used in the manual as well, so do I. I'll respond to that in your quote below. > > > Initially I tought that making wayland-protocols a > > > native-inputs dependency as it should, it would reduce number of > > > dependants on it. But it turns out other way around. With this > > > patchset we are fixing gtk+ to not advertise it as dependency in > > > its .pc files, and moving wayland-protocols to native-inputs > > > where it should be. > > That's not what native-inputs are used for. native-inputs > > provide binaries that the host/build machine needs to run in order > > to compile a package. It doesn't seem to be the case that wayland- > > protocols is such a package, is it? > wayland-protocols is different package. It does not include any > binaries only protocol specifications (some xml files), which are > used for code generation. We could consider them as a kind of > autoconf/bison like inputs, but tightly scoped for wayland needs, > although they are not so and not binaries. And what kind of code is generated from them? I would assume it's target code. And since wayland-protocols is no tool to process those XML files, but the files themselves, I'd hazard a guess that it should rather be built for the target. While currently this appears to make no difference, there might well be a time in which those files differ for some two architectures, which then would cause problems in cross- compiling contexts were it a native input. > > > Patch provided for gtk+ also merged with upstream. > > > > > > Patchset prepared from core-updates-frozen. While it seems that > > > it will impact many other packages, actually this patch reduces > > > number of packages that touches wayland-protocols and probably > > > avoids it at runtime. > > But it still impacts a large number of packages in ways that > > could > > potentially break and haven't been tested, right? > Technically, this package does not change anything in terms of > binary producing. wayland-protocols remains to be an input as it was > before. I.e. wayland compositor, wayland application, wayland using > library, application which uses wayland using library, binary output > is not impacted. If binary output is the same, is there any thing > else to test? In that case I'd hazard a guess that it's fine, but the phrase "wayland-protocols remains to be an input" is perhaps a bit weird given the change to native-input. > There are two things which are being changed. First as you > pointing out is the way Guix treats it, i.e. reducing closure, etc. > Second is propagation of inputs. Currently (without this patch), > since it is listed in propagated-inputs (and also advertised in .pc > files), wayland-protocols as requirement, needlessly, getting pushed > down then hierarchy. We ought to move it from propagated-inputs to inputs and either (if we can) ignore pkg-config or patch the pkg-config files. W.r.t. pkg- config I do wonder whether Requires.private needs propagation, though, it normally should be just Requires. > Let's take 4 cases that we have here (I do not pretend to be > complete, of course, there are might be more levels/combinations, > just attempting to illustrate current case in simple words/terms): > > 1. wayland compositor (weston, wlroots/sway, etc.) > 2. wayland client application (grim, mpv, etc. applications > directly interacting with wayland interfaces) > 3. wayland client library (qt or gtk+ in this case, also directly > interacts with wayland to abstract it for user applications) > 4. user application of wayland client library (in this case some > gtk+ based application) > > For 1 and 2, both types should have to specify wayland in inputs > (or propagated-inputs), and wayland-protocols in native-inputs. Why? > One of purposes to have layer 3, is to abstract from 1 and 2. > i.e. when I write gtk application, as user I should not be aware > of where/how this application is going to run, via xorg or wayland. > Then why I should be aware of wayland/wayland-protocols and make > sure that it is provided as build input for my application? IIUC you don't need to be aware when gtk propagates the input? It's similar to how you still need an Xorg server to test your GTK application. > More over, if I will have some other unrelated package that > depends on my gtk application (item 4 above), i still will see > wayland-protocols among my inputs. > > Currently, thanks to Guix, it is getting resolved by having it > listed in propagated-inputs. > > For the long run, it was also fixed in gtk, so that > wayland-protocols is not going to be advertised in gtk's .pc files > any more (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3960 > and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3961). Which is fine in and of its own, but not the right thing w.r.t. native- inputs. > I suppose that, initially wayland-protocols was listed in > propagated-inputs for this same reason, because gtk was > advertising it in .pc files. Probably. > > While reducing closure size is generally a good thing, I think we > > do need to be careful whenever "build time vs. run time" and native > > vs. non-native are confused. > I'm using terminology as per documentation :) may be it should be > reworded in some other way to avoid confusion. 8.2.1 package > reference: > > ‘native-inputs’ is typically used to list tools needed > at build time, but not at run time... You're quoting the manual out-of-context and (accidentally) misuse the word tool. > When cross-compiling, dependencies listed in ‘inputs’ are > built for the _target_ architecture; conversely, > dependencies listed in ‘native-inputs’ are built for the > architecture of the _build_ machine. This is the distinction to make here. "Typically used to list tools" here means that the package provides a tool (i.e. a binary) that you invoke at some point of your recipe. This can be a compiler like GCC, a tool to create Makefiles like automake, or an X server to launch tests in. The only thing in that regard when talking about wayland would be the wayland-scanner tool provided by the wayland package. Notice the contrast to what you said before with wayland being an input and wayland-protocols being a native one. If you need wayland-scanner for you build, it should be a native-input (as well as an input, probably). If this does become a problem later on, a bin/lib split for wayland might make sense. Regards