From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:56996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3bTD-0004FC-Nd for guix-patches@gnu.org; Tue, 12 Mar 2019 03:05:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3bTC-0001ql-QV for guix-patches@gnu.org; Tue, 12 Mar 2019 03:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3bTC-0001qQ-Mp for guix-patches@gnu.org; Tue, 12 Mar 2019 03:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h3bTC-0002yX-Cc for guix-patches@gnu.org; Tue, 12 Mar 2019 03:05:02 -0400 Subject: [bug#34613] Acknowledgement ([PATCH] gnu: Add prometheus.) Resent-Message-ID: References: <20190222114537.1431-1-boskovits@gmail.com> <87k1h5rr3k.fsf@gnu.org> From: Pierre Neidhardt In-reply-to: <87k1h5rr3k.fsf@gnu.org> Date: Tue, 12 Mar 2019 08:03:55 +0100 Message-ID: <878sxkh8v8.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: =?UTF-8?Q?G=C3=A1bor?= Boskovits , 34613@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > (Should we package the stuff there, and link the sources into the tree?) > > I think we generally do that yes. Pierre, Leo? We used to, but since Go 1.10 there is a bug in the compiler which keeps tr= acks of _all_ recursive dependencies in the resulting _static_ binary. This can result in a ridiculously large closure size. As for now, I'd recommend the following: =2D If there are many dependencies (check the vendor/ folder), use it, it w= ill be easier and produce a package with an ideal closure size. =2D If it's only a few dependencies, it's probably worth it to package all = of them independently. > > I am willing to do the work, but I need some pointer, as I am not into = go. > > I=E2=80=99m ignorant about Go, but hopefully Pierre, Leo, or someone else= with > experience with Go packaging can provide some guidance! For a Go package with unvendored deps, I suggest you look at "demlo", it's reasonably easy to understand. For vendored deps, look at go-ipfs. The Go build system does most things right. A few pointers: =2D Prometheus might use its own build system, e.g. with a Makefile. Then = you'll have to read the makefile to know what it's doing. =2D In Go, it's possible to include multiple packages in the same repositor= y. Our Go build system does not handle this very well and it's not possible to u= se multiple such packages as dependencies: you need to create a union. See go-golang-org-x-crypto-union. Let me know if you need more help, I can look into it. Good luck! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlyHWdsACgkQm9z0l6S7 zH+YlAf/Tv0VqZc1TyvxNMVsm15r8A4PhR7c2wX9p4ZGr5foS9OKozfMwqPO+NDW u6QhFKLoE2U13ACgMxm0nV1RNgV3+U6kuxBxxZy4UIRS3m9qiPG4Zj3qgMGTnU9T wujLlkNy4YiYCiGi6kXtgRdm8m50+IX/6qX5KJFWB/hmQkWKv75zzKGjVU5USQo2 r1HAz11twWBDsChgbl7KhEuIa0Lq7jHawOkTbF3bxD/KdDUFPyzd002fjmpQpHZz RpKmJPVrpiMH6Cpu1GoAbW+0bJCr5jeGLvMMG2HxeA55lCBgOaeJU3zSQqePd2/D VUk+P0tLiGAzTPKmEmizePrrYfXC5Q== =i+P+ -----END PGP SIGNATURE----- --=-=-=--