From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: Consolidating Go packages Date: Thu, 15 Aug 2019 11:19:06 +0300 Message-ID: <20190815081906.GA27046@E2140> References: <20190814190617.GA30864@jasmine.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36515) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyAyZ-00042S-Ni for guix-devel@gnu.org; Thu, 15 Aug 2019 04:19:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyAyY-0003Gz-GJ for guix-devel@gnu.org; Thu, 15 Aug 2019 04:19:15 -0400 Received: from flashner.co.il ([178.62.234.194]:44042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hyAyY-0003G2-7f for guix-devel@gnu.org; Thu, 15 Aug 2019 04:19:14 -0400 Content-Disposition: inline In-Reply-To: <20190814190617.GA30864@jasmine.lan> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 14, 2019 at 03:06:17PM -0400, Leo Famulari wrote: > We can improve the organization of some of our Go language packages in a > way that will make it easier to use and maintain them, and will also > more closely match the way they are developed and used upstream. >=20 So to summarize, while it is techincally possible to "build" them, in actuality they are used in source code form as part of the build process. Or, to put another way, they are unbundled sources that we need to "rebundle" to build our chosen package. > For example, take go-golang-org-x-crypto-pbkdf2 and > go-golang-org-x-crypto-salsa20. These are libraries that can be imported > into Go code independently of each other. >=20 > However, they are both part of the upstream Git repository at > and it's not idiomatic to distribute them > separately, or to allow their versions to diverge. There are other > consequences that are seriously unidiomatic, such as needing to make > Guix packages for "internal" components that really should not be > exposed at all. Overall, it complicates our Go packaging effort. >=20 > The big difference for Guix packagers will be that these library > collection meta-packages like x/crypto will not be compiled at all when > they are "built" =E2=80=94 they will just be source code. This is normal = when > developing Go software but it may obscure the dependency graph. >=20 So, either it should be just a "source snippet" or it should be a hidden package. > Originally we chose to package these things separately because if you > try to compile a Go program that imports one of them, but it can't be > found, the error message specifically complains that the library is > missing, not that the entire x/crypto Git repo is missing. >=20 > I think that kind of "exploratory" packaging process, where you try to > build a Guix package and add dependencies one at a time when the build > fails, is pretty common, but it led us astray here. >=20 > I'll push a Git branch 'go-consolidation' on Savannah soon and will push > it to master soon-ish, pending your comments. >=20 With the limited time I've spent with rust packages it seems to me that rust basically behaves similiarly. One difference to what you've written above is that an incremental (see what it complains about and add it) approach does work. Something I've thought about with rust packages is unless it provides an actual executable it should be a hidden package. I'm guessing no one should ever install the x/cryto package but its source absolutely needs to be packaged to build other packages with it. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl1VFWoACgkQQarn3Mo9 g1GvxhAArKewciD+bxS8jbRyMv+jt3Btqp5MC3gael1vDL8re0MSVV6q2Bg4G0Ea 41ZhbrzQ6O5Godml1m/c1gnFw1NZBE3RTy/dC5t04xR1tpmoxeTYo4ANz6+tyYkY O2eDsOLX22XavIXIQ170CDUlJo7aTy7b/Cv9yo6DEfrfyF9KH/jSfzDRCa3V8SMt k6Aw5VsqLr/qje+VIudOkWe5xdl40knRz5fyZuWH2gCOthGWSozF+raTKhqjp/KR l4e+fa5nPa1aaHC7Np7Fo4xJLjHF5N7zBYzHGTx7j8zwgK8FJN37i/BQml2QNHoJ wMAqjfzVDLxvZKkZTBwG7gtNwZBP1gBpNEHTP9929tJKu0hf4mbZmq4ZgzMyrgkY dD0NGeHRzN5X1ecEl4k7WU9VNjadrcvgqZnl3T0o4Ie8ov/rlhgdhNqOLqG9ika6 mzLOMAkz6AYUypQz5hO3q5xpbgafbOXOFC7pzvGFDqa/PpHsTvHS7T2VnzdtCS3u xV15wmY+lJOiXrjGyT4bHJIcj2a/vpmyaWjZdDUuzALHYRx91MmYhGzAzA9rco9V h+2xRGc/6jN6FEJlDzzp2tPCnlcSd3FslwwUAi0yxFz79x1kw7Ls+1SNQvpqvEmt 4z5N1ETG4cMFVCVGQBS5Kw5hz9Qxmqxc1vv6LnSVW/p4z4sLx5I= =3D9t -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--