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 10CEA138334 for ; Mon, 9 Sep 2019 23:21:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D467E0951; Mon, 9 Sep 2019 23:21:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 CC4BFE0905 for ; Mon, 9 Sep 2019 23:21:46 +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 50F8B34AF4D for ; Mon, 9 Sep 2019 23:21:45 +0000 (UTC) Received: (nullmailer pid 673 invoked by uid 1000); Mon, 09 Sep 2019 23:21:42 -0000 Date: Mon, 9 Sep 2019 18:21:42 -0500 From: William Hubbs To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] rfc: go 1.13 and go modules Message-ID: <20190909232142.GA500@whubbs1.dev.av1.gaikai.org> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20190909173418.GA30003@whubbs1.dev.av1.gaikai.org> <20190910083517.1877fd18@katipo2.lan> <20190909214616.GA32528@whubbs1.dev.av1.gaikai.org> <1639276.kfM2EdqyNB@ws> 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="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <1639276.kfM2EdqyNB@ws> User-Agent: Mutt/1.10.1 (2018-07-13) X-Archives-Salt: f6c438a4-614b-4840-85e7-4a74d93e5524 X-Archives-Hash: 68940222689be7499aa54354d9b5d761 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 09, 2019 at 03:57:18PM -0700, Georgy Yakovlev wrote: > On Monday, September 9, 2019 2:46:16 PM PDT William Hubbs wrote: > > On Tue, Sep 10, 2019 at 08:35:17AM +1200, Kent Fredric wrote: > > > On Mon, 9 Sep 2019 12:34:18 -0500 > > >=20 > > > William Hubbs wrote: > > > > There is another option I want to try which is adding "go mod vendo= r" to > > > > src_unpack for go packages. > > >=20 > > > Is it infeasible to write a tool that you execute as a maintainer, th= at > > > simulates what "go mod vendor" would do, but instead emits a list of > > > entries for SRC_URI, and then have an eclass or something construct t= he > > > vendor dir from those? > > >=20 > > > That's what is available for rust stuff. > >=20 > > I'm not sure how feasible something like that is. > >=20 > > $ go list -m all > >=20 > > will list the dependencies of a module, but that doesn't look like it > > can be translated into src_uri format. > >=20 > > You would basically have to parse go.mod exactly the way upstream does > > it and come up with a way to download the correct versions of the > > source. > >=20 > > William >=20 > check mail-client/aerc ebuild. > I use "go list -m all" and manually format EGO_VENDOR string which will b= e=20 > translated into SRC_URI by eclass. > tool is certainly possible and should be quite easy to implement. > some manual editing will still be needed if dealing with forked packages/ > repos, but looks pretty straightforward. > This is very similar approach to cargo ebuilds and it supports offline=20 > installs, PM checksumming and does not require packaging every single go= =20 > dependency as a package. Ok, I took a quick look at this. We will need another eclass similar to the golang-vcs-snapshot eclass, but it doesn't need to mess with GOPATH since GOPATH isn't used by go modules. I will also look at go list -m all and see what comes out of it. Thanks, William --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTVeuxEZo4uUHOkQAluVBb0MMRlOAUCXXbefgAKCRBuVBb0MMRl OOhSAJ0Ro/447tx7IM3iU2f0s77BID4JiwCfTzFqxbp6+8lI8egkwrYtvIeDhlw= =GwBa -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--