From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7EF70138334 for ; Thu, 26 Sep 2019 00:21:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19609E08F9; Thu, 26 Sep 2019 00:21:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CFA77E088C for ; Thu, 26 Sep 2019 00:21:45 +0000 (UTC) Received: from whubbs1.gaikai.biz (unknown [100.42.103.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: williamh) by smtp.gentoo.org (Postfix) with ESMTPSA id 3FA4334B59E; Thu, 26 Sep 2019 00:21:44 +0000 (UTC) Received: (nullmailer pid 5047 invoked by uid 1000); Thu, 26 Sep 2019 00:21:16 -0000 Date: Wed, 25 Sep 2019 19:21:16 -0500 From: William Hubbs To: gentoo-dev@lists.gentoo.org Cc: mgorny@gentoo.org Subject: Re: [gentoo-dev] [PATCH 1/1] go-module.eclass: new eclass for go modules Message-ID: <20190926002116.GA4964@whubbs1.dev.av1.gaikai.org> Mail-Followup-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org References: <20190924180847.17149-1-williamh@gentoo.org> <20190924180847.17149-2-williamh@gentoo.org> <0cc7941079ba4ec9149f2a76b0a1bfd20649304e.camel@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <0cc7941079ba4ec9149f2a76b0a1bfd20649304e.camel@gentoo.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Archives-Salt: 55f1c741-7faa-41ba-b8e2-52f91edb16b0 X-Archives-Hash: 4d49886b4daf9d3223784f50fabcea3a --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 25, 2019 at 10:02:34PM +0200, Micha=C5=82 G=C3=B3rny wrote: > On Tue, 2019-09-24 at 13:08 -0500, William Hubbs wrote: *snip* > > +# @DESCRIPTION: > > +# This eclass provides basic settings and functions > > +# needed by all software written in the go programming language that u= ses > > +# go modules. > > +# > > +# You will know the software you are packaging uses modules because > > +# it will have files named go.sum and go.mod in its top-level source > > +# directory. If it does not have these files, use the golang-* eclasse= s. >=20 > Hmm, don't we want to eventually have one eclass that fits all packages? > I mean, if you can automatically determine whether modules are present > via go.mod file, can't you just make one eclass that determines that > and passes correct flags for both cases? I hadn't thought about making one eclass for several reasons. The primary reason is that go upstream is pushing toward all go devs using modules, so ultimately building without using modules will be unsupported. The second reason is part of the API for a combined eclass would have to be a global scope variable to tell the eclass whether or not to use modules. The reason for this is src_unpack has to behave differently based on whether or not the package uses modules. Also, most of the machinery in the golang-* eclasses deals with manipulating/using GOPATH which is completely irrelivent for modules. golang-vcs-snapshot.eclass and golang-vcs.eclass are only needed if your package is not using modules. The tl;dr is that Go builds are becoming much simpler to deal with because of go modules. If you think there is functionality in the golang-* eclasses that is generic enough to add to this eclass, let me know. I'm about to send out a re-roll that I think covers your changes. William --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTVeuxEZo4uUHOkQAluVBb0MMRlOAUCXYwEdQAKCRBuVBb0MMRl OHjiAJ9aOoVLflreLJZpYWBR0AZREzRnigCgtHcFNXIz3C/wEnN4rCguj5O0xuw= =pRk/ -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--