From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SPswCZNIPmJJIwEAgWs5BA (envelope-from ) for ; Fri, 25 Mar 2022 23:56:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kMkNApNIPmI2YQAAG6o9tA (envelope-from ) for ; Fri, 25 Mar 2022 23:56:19 +0100 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 95D2D1034B for ; Fri, 25 Mar 2022 23:56:18 +0100 (CET) Received: from localhost ([::1]:36744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXsqv-0002HI-Cp for larch@yhetil.org; Fri, 25 Mar 2022 18:56:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXsqh-0002FX-Ar for guix-patches@gnu.org; Fri, 25 Mar 2022 18:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXsqh-0001LY-2A for guix-patches@gnu.org; Fri, 25 Mar 2022 18:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nXsqh-00066Y-1Y for guix-patches@gnu.org; Fri, 25 Mar 2022 18:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54560] [PATCH 01/47] gnu: Add go-google-golang-org-protobuf. Resent-From: Leo =?UTF-8?Q?Nikkil=C3=A4?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Mar 2022 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Maxime Devos" , 54560@debbugs.gnu.org Received: via spool by 54560-submit@debbugs.gnu.org id=B54560.164824896123449 (code B ref 54560); Fri, 25 Mar 2022 22:56:02 +0000 Received: (at 54560) by debbugs.gnu.org; 25 Mar 2022 22:56:01 +0000 Received: from localhost ([127.0.0.1]:52719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXsqf-000665-58 for submit@debbugs.gnu.org; Fri, 25 Mar 2022 18:56:01 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXsqe-00065q-7F for 54560@debbugs.gnu.org; Fri, 25 Mar 2022 18:56:00 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 161AD5C016D; Fri, 25 Mar 2022 18:55:55 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute2.internal (MEProxy); Fri, 25 Mar 2022 18:55:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lnikki.la; h=cc :content-transfer-encoding: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=fm2; bh=r1Pvs3uVbGM74I EzAYX7JtxlyjAWHkLEx0wMhg4JueY=; b=ZKR3DZ1dejeHySTDNTZ9p34XZXJujN z5czMu8qHDcw8BjH4rgESBDd92tYoa3A8J0Mc5diZjcDhfFRynEB68kb1GXzv8GR DzWkF5DXU55kWYMXW3L+Oq+6xBCiYNeN/xkUahmdTKFwpg4vGhT/UgPRIz7Nn09p bXtp3FDq6hMYLw8W6prtJj/lLJWz/uxBCNpE3JV4GMrcd6rRuFsqHyUhv+QlN4ET RnztVrNkWXg4QzL3QWsUDcviw9qHdoGCaM+vX8Bo8lnT4AyXvPVupgo1FLp9+1bM xH80n4wS1Qw5qM+t+70TmbtEcdnfdwNfsdIW+1uzTj8By/O8jkTvL0PA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date: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; bh=r1Pvs3uVbGM74IEzAYX7JtxlyjAWHkLEx0wMhg4JueY=; b=UTzdBXlw l4nRXtlKii1UuJM4NLrG/DMGh1CvNqWS8w+rf1ib6rUH3Tm8UTaN/E09/52v/OmO FgaYFL5qIt3H6iyTKASRhZHTPRBq1JFtWJ2i+2Lar5VN4r/eFXL/vwA7GiUKv2gw I/DAnX84Op+G12OEjVOCjRGRw4lG1o4zG1yZqNzeizzbT+ua96MOk8j/TOeEzGQe pJpY2257oRYk2KDIobUIqgD7uBp4JPeEkwh9d4RmPhmEV6jKm4x6BtfcUpEe/8WK 09tZ82iHb8WPuN7+mj+5PzwKMWgfSmUIoaE1a251iv2j5IG64tLVm0FC/ay2zfoH AP7ZGTWAaYSPpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudehvddgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnvgho pgfpihhkkhhilhomuceohhgvlhhloheslhhnihhkkhhirdhlrgeqnecuggftrfgrthhtvg hrnhepfedtgeelvdejieehgeefudeuheevieefvdetffehuefhkefgudelhedtgeevhfek necuffhomhgrihhnpehgihhthhhusgdrtghomhdpghholhgrnhhgrdhorhhgpdhgnhhurd horhhgpdhgohdruggvvhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehhvghllhhosehlnhhikhhkihdrlhgr X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E318AAC0E98; Fri, 25 Mar 2022 18:55:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4911-g925b585eab-fm-20220323.003-g925b585e Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20220325055517.2060-1-hello@lnikki.la> <20220325133211.5128-1-hello@lnikki.la> Date: Fri, 25 Mar 2022 22:55:34 +0000 From: Leo =?UTF-8?Q?Nikkil=C3=A4?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648248978; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=r1Pvs3uVbGM74IEzAYX7JtxlyjAWHkLEx0wMhg4JueY=; b=nGgWYTGmTkj2XMQxVgJCvZbLL+849UmE0d027g4X0qZLeZo9gX1n2SfL37i+oXvkwLe9uM nc2BOul3SDVVe8BGIcHpTlya98w3ktYsA/4uLBoS1hWZjziu1piCricvfbCzKEQscCFhNH 0Vb8nZPlvMHv3VPvHv5PCB9qVGIGLqnntCo/aw+kYWc9ErudhRX2sQ0ph2E9hGAyl4rUUn QfLKl8Ch81TBIMD4MTUkZooX2t429HYdF71PESII7K9wjHZUc2PJn6PsjuCY5ig3CBsfR7 WlG3qHmt6o/9eEhXHCFvehJrXvbn2GgBm1RdeLyc3Q2b3pfZzrBOseGtUYrYRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648248978; a=rsa-sha256; cv=none; b=BV3Q8kClT/UvQC/bxP0w2MVHzkTrXlQmLrm7rRhtquSIKP5mdS6jULHhWFZrcHd/xmo2at c6ykFTmCDqT0X+lc5cDQa9bJh4BBT6/pvJBqDuU/gvvdEU1NNtxy0H5uKtdt8R9gSlo9vx MgTYuZ8mCrLnHHtpUYJakBnfzvznCQpNAhO+waLDBv5RgcS9qafc8rg7HpuuUzHy0QLmKh AjnNgoSmXSgL8p2xGT8MPQuBzJ6wLeL8MLLZ4PTFzWybmjXe29rsBSSHisQ+X3ivTNCjKF IZ5+J0bxE7R0MXIn/IYqZY8g/b7uFpbOn9cEYIP0XVZDwL14b2JaoLY6SkiIoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lnikki.la header.s=fm2 header.b=ZKR3DZ1d; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=UTzdBXlw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lnikki.la (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lnikki.la header.s=fm2 header.b=ZKR3DZ1d; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=UTzdBXlw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lnikki.la (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 95D2D1034B X-Spam-Score: 6.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: o1reP4JrDTr2 > see go-github-com-golang-protobuf-proto. I clarified the difference between github.com/golang/protobuf and google= .golang.org/protobuf under 03/47. Should be applied, the separate `-pr= oto` and `-ptypes` packages could certainly be replaced by the merged pa= ckage. > What are =E2=80=98glob paths=E2=80=99 here? They don't appear to be u= sed anywhere else > in Guix. What's the problem with the default build phase? There's no top-level package in google.golang.org/protobuf, instead the = repository consists of individual packages which depend on each other. Looking at (gnu packages golang), I see two ways this has been dealt wit= h before: splitting each one into multiple Guix packages, or building al= l of the packages together in one Guix package. There are many of these packages in the repository [0], and another list= of "internal" packages [1]. (This listing doesn't cover all of them, so= me are deeper within the tree.) In order to use this library you'll need= most of them, and splitting each one into a separate Guix package feels= unnecessary. There are examples in (gnu packages golang) where a single Guix package = contains many Golang packages, e.g. go-github-com-blanu-dust, redefining= build phases to reduce a list of packages instead. However, the number of these packages makes this approach difficult. The= list of internal packages is not considered public nor stable; these ar= e added and removed between releases. Maintaining a list of these within= Guix seems prone to breaking during the update process. `go build' and others support wildcards [2], which are also used within = build scripts of the library [3]. Since the upstream build makes use of = these, I thought they would be fair game to build it. However, due to how go-build-system correlates these import paths with d= irectory paths, supporting wildcards in `#:import-path` directly would r= equire further changes to the build system. Adapting how go-github-com-blanu-dust and others call these build phases= directly, I found this to be the simplest way to use the wildcard capab= ility, and avoid having to maintain a list of the packages within Guix d= irectly. Happy to try out other approaches, this is just what I came up with earl= ier. I should've also specified `wildcard' instead of `glob' when naming this. [0]: https://github.com/protocolbuffers/protobuf-go#package-ind [1]: https://github.com/protocolbuffers/protobuf-go/tree/v1.27.1/internal [2]: https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns [3]: https://github.com/protocolbuffers/protobuf-go/blob/v1.27.1/integra= tion_test.go#L118-L120