From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Packaging gx (for IPFS): Need to update default Go to 1.11? Date: Sun, 11 Nov 2018 17:43:33 +0100 Message-ID: <87wopjlg3u.fsf@ambrevar.xyz> References: <878t26b0i1.fsf@ambrevar.xyz> <20181106173116.GA3232@jasmine.lan> <87k1lqyuta.fsf@ambrevar.xyz> <20181106195712.GB6749@jasmine.lan> <87a7mlz6hv.fsf@ambrevar.xyz> <87o9b0n9gr.fsf@ambrevar.xyz> <20181107182642.GA17483@jasmine.lan> <87efbwmyyz.fsf@ambrevar.xyz> <20181107204054.GA29657@jasmine.lan> <87d0rgmx59.fsf@ambrevar.xyz> <20181107210309.GA30589@jasmine.lan> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLspt-0007o1-68 for guix-devel@gnu.org; Sun, 11 Nov 2018 11:43:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLspo-0005Ip-4s for guix-devel@gnu.org; Sun, 11 Nov 2018 11:43:44 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:50877) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gLspm-00059e-4z for guix-devel@gnu.org; Sun, 11 Nov 2018 11:43:40 -0500 In-reply-to: <20181107210309.GA30589@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 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I've been studying the situation: From=20https://golang.org/doc/go1.10#build: > The go build command now maintains a cache of recently built packages, > separate from the installed packages in $GOROOT/pkg or $GOPATH/pkg. The e= ffect > of the cache should be to speed builds that do not explicitly install pac= kages > or when switching between different copies of source code (for example, w= hen > changing back and forth between different branches in a version control s= ystem). From=20https://golang.org/doc/go1.11: > Go 1.11 will be the last release to support setting the environment varia= ble > GOCACHE=3Doff to disable the build cache, introduced in Go 1.10. Starting= in Go > 1.12, the build cache will be required, as a step toward eliminating > $GOPATH/pkg. The module and package loading support described above alrea= dy > require that the build cache be enabled My understanding is that we cannot rely on the /pkg/ folder anymore, since = Go 1.12 won't use it at all. We could maintain a store-level Go cache, but I'm not sure that's doable an= d I don't think it makes much sense. Without a cache, it seems that it's effectively impossible to re-use pre-built libraries when building Go packa= ges. From=20the user perspective, this would not be a big deal because the cache= can be used in this context. Only the first build would be slower. More importantly, that would mean that we no longer need to build Go librar= ies: we should simply ship the source code in /src/. The upside is that it saves space in the store and makes for smaller substitutes. For the other issue with flag forwarding, there might be a better solution.= =20 From=20https://golang.org/doc/go1.10#build: > The go build -asmflags, -gcflags, -gccgoflags, and -ldflags options now a= pply by > default only to the packages listed directly on the command line. For exa= mple, > go build -gcflags=3D-m mypkg passes the compiler the -m flag when buildin= g mypkg > but not its dependencies. The new, more general form -asmflags=3Dpattern= =3Dflags > (and similarly for the others) applies the flags only to the packages mat= ching > the pattern. For example: go install -ldflags=3Dcmd/gofmt=3D-X=3Dmain.ver= sion=3D1.2.3 > cmd/... installs all the commands matching cmd/... but only applies the -X > option to the linker flags for cmd/gofmt. For more details, see go help b= uild. I think it does not work for "-tags" however. So we need to ask golua's maintainer if there is a solution to build golua differently. If not, then the best solution I can think of is to patch golua to build wi= th lua5.3 by default. =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlvoXDUACgkQm9z0l6S7 zH+C5gf/XsmrYeuGzhzGyIyoZ1AhtWtJk3Ju/Ypi8/kV1SvErRZyA82Fqp6MgwQw 4L2zKIJ2mMNB2m2plZ/dE+IcA9+bwhQcdnlMwJtx1/jQixWtlSLUrOaJgGt8Irru lnWK2/tfZHFXpi62GitqJKDYHN4KQZy774rVw+oTjDWXcJU8ErTeKTyMCFdEsR7C VN1HjZG1TS1vtkcn3nsW4pL/wXSMhYJHUXCUj58ClJbU9qmKeY1fNDLIKPnSg5zN Aph+RsEK47SR1CGvMSNOrYcYY4QxJaaPOxQKgdxuG4eaTcUsUulBBfFGvyK6E8F2 ooQY+3fOlGsmPTsDIfimLXkn4UJVTQ== =zboo -----END PGP SIGNATURE----- --=-=-=--