From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Packaging Terraform, a Golang package Date: Thu, 20 Dec 2018 10:47:18 +0100 Message-ID: <87woo4zg0p.fsf@ambrevar.xyz> References: <875zvqjjnl.fsf@gmail.com> <875zvpm6d3.fsf@cbaines.net> <87bm5g4k8r.fsf@gmail.com> 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]:39735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZuvQ-0007kb-4J for guix-devel@gnu.org; Thu, 20 Dec 2018 04:47:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZuvM-0002n4-Us for guix-devel@gnu.org; Thu, 20 Dec 2018 04:47:28 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:38613) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZuvM-0002lm-Ny for guix-devel@gnu.org; Thu, 20 Dec 2018 04:47:24 -0500 In-reply-to: <87bm5g4k8r.fsf@gmail.com> 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: Chris Marusich Cc: guix-devel@gnu.org, 30806@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > 1) Is it bad that our package definition isn't running "go generate" or > "go fmt"? Do you know if "go install" does this for us somehow? I > don't think "stringer" or "mockgen" are present in the build "go generate" is used to generate code, it's like a preprocessor. Most Go programs don't use it, but if they do, then it's needed. "go fmt" should not be part of the build process in my opinion. A code formatter fits better into a Git hook or something. > 2) After I ran "make" ad-hoc, I couldn't find a built "terraform" > executable anywhere. Where is it? Am missing something obvious, or > could it be that the official documentation incomplete and I need to ask > upstream for advice? I haven't looked into it, but it should be either in ~/go/bin or in the pac= kage source folder, something like ~/go/src/.../terraform/. > 3) The official instructions seem to arbitrarily choose to run the build > in parallel, using 4 threads, which means this package won't play nice > with build arguments like --cores. I suppose I might need to work with > upstream to fix that. I think Go decides this on its own. Off the top of my head, there is an environment variable to control the number of CPU threads used globally, GO_xxx_CORES or something like that. =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlwbZSYACgkQm9z0l6S7 zH+4+wgAqodcAcZ28ZHf8W9KaeUXwsffaoqr19e1Gixwc8enb2X61YyG/TZYUp/j ICfXe7xzjm8n4uKmSjYa8Te17bVR+tfEEDEq8wJoBBlCFS60kIXSFfGPw4qFPmm4 +0q4BB/CKmh75nmL6K2UYPwOViHHuSezd5mXk1CYbvA00KqFNw/+hz7DcNhK4XsB LkSxYSux5CwGaZdWYi8lRStBChkeIW52N4BurAj5CpGzG9KxJ70plF00bhq4paKM t8db2G+YR0cvE3STdf4GbZ+TYVBgat9BfnY7iOBh7Ju7nyjdJ+rvcaOj2LBLHccz 7IyAvZizAscQCJ2w6oWyksKSs2YUfQ== =ddux -----END PGP SIGNATURE----- --=-=-=--