From owner-freebsd-ports@freebsd.org Tue Apr 18 02:34:11 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9634D4328F for ; Tue, 18 Apr 2017 02:34:11 +0000 (UTC) (envelope-from christopherhall.hsw@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C747AD97 for ; Tue, 18 Apr 2017 02:34:11 +0000 (UTC) (envelope-from christopherhall.hsw@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id C6A11D4328D; Tue, 18 Apr 2017 02:34:11 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C643FD4328C for ; Tue, 18 Apr 2017 02:34:11 +0000 (UTC) (envelope-from christopherhall.hsw@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98824D96 for ; Tue, 18 Apr 2017 02:34:11 +0000 (UTC) (envelope-from christopherhall.hsw@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id a188so28037760pfa.2 for ; Mon, 17 Apr 2017 19:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y9ujRRiZJCe646IayPvYrRtlqglyd5kW+0QuwOGOg2M=; b=QsL4H+aV9+MI2yE9uq2Rh1ffWkO60RhgC1BWV1vNKnUrU+Wmt4AYuZehWW+1zvEcMC Nbds8n+/6qF/sLdJRk6aft4VVe/b3SOeSd6+vqbs1C/xxpYroA5K59vS8F56G0JtZ6wB J2cP0hZLvA4opIzVwmTR9OV0ehtxBUAjFnTS/JGHu4UG7j2sUpqCsLu4BV73OrD5CMVF XL8HPnJ7ga7S6kni88OF0BL1srtwtIqn/JCmT2bOG3E56tgz/x55JK3gFb28lWpdDk9o 3N0OLBMAtsE61PvgtdWgvGWsOaOdod5VEhE4oLC1orX3DnB347QMfkG7LrNEpT3lzDhb y3NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y9ujRRiZJCe646IayPvYrRtlqglyd5kW+0QuwOGOg2M=; b=CtJIll2vQbO/CDIJVIIsO2jXEjEA77Cmu4sFR6qo43/0wJEaZ9SMdFH98hFbRupv4L eDKaczBIxgColoRJQzVc5PoYdC5xf89tyAM0auu0S2JeXq3i8a4PNqDWUz5N0a2OpoGq QlT1BZIJZQe9a8QBkftujmzCXKbkLu2tFxiFFvPNHNjUbdn5lk/WsgH2ulVFHjA+ywGs V2PnnPpYlNPCb5yzgnAcDA18Z22AtH894UNsbOh+tmk30L9tckLrQ28DTlzPvOoROybQ 04mmeimNq5J3OZQyRASRoJ8LbVO7Ph55a8UxKdTrZf8SQLZc/WT+NTdYKb/Zpr6FjBMO JsEg== X-Gm-Message-State: AN3rC/4yzs5+JjpOvsLIo062XWZKE/DEopRjcwBBr2VJGOgmXHLM3l8d QjXv0OjJXqwC7xq/bpMlOw== X-Received: by 10.98.9.10 with SMTP id e10mr15292150pfd.101.1492482850767; Mon, 17 Apr 2017 19:34:10 -0700 (PDT) Received: from arria.bitmark.lan ([2001:b030:2314:200:f279:59ff:fe6a:4741]) by smtp.gmail.com with ESMTPSA id k23sm20376464pfg.26.2017.04.17.19.34.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Apr 2017 19:34:10 -0700 (PDT) Date: Tue, 18 Apr 2017 10:34:05 +0800 From: Christopher Hall To: Steve Wills Cc: ports@FreeBSD.org Subject: Re: Packaging Go Libs Message-ID: <20170418103350.433498f4@arria.bitmark.lan> In-Reply-To: References: X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 02:34:12 -0000 Hello Steve, On Mon, 17 Apr 2017 10:20:20 -0400, Steve Wills wrote: > Hi, > > I'd like to propose eliminating packaging of Go libs. For my own go application I use the ports mechanism to specify specific versions of dependencies and it would only have been tested with those; if forces to use an older version it would likely fail as the APIs on some libs have changed quite a lot. So I personally see no need to have any go dependencies in the ports tree. I currently like the idea of having all the go dependencies statically linked and only few external "C" libs as dynamic links as it makes packaging and deployment very quick. > > Almost every Go app is developed with a different version of any given > lib than what another Go app might use. Forcing a Go app to use a > different version than what upstream might have chosen is error prone > at best and likely to produce a build that's unsupported upstream. So > for the packaged libs to even be useful, we would have to have as many > versions of each lib as there are consumers, or nearly as many. > > Further, best practice in the Go community is for Go apps to vendor > all their dependencies and almost all apps do that. This is the > reason most Go apps use different versions of it's libs. > > So to me, packaging Go libs doesn't make sense and I think we should > remove the Go libs from ports. > > Existing ports which use the Go libs should be updated to not use the > Go lib ports by doing one of these, in priority order: > > * Converted to using vendored deps included with the package source if > possible (preferred) > * Fetching the versions of deps specified by upstream (in the case of > vendor.json) > * As a last resort (deps are not included nor versions specified > exactly) fetching versions of deps available at the time of upstream > development > > Further, documentation should be added to the Porters Handbook saying > that we don't package Go libs and portlint should be updated to check > for installing files in GO_SRCDIR and GO_LIBDIR (exceot lang/go*). > > For reference, here's the list of Go lib ports that I found at the > moment: > > archivers/go-compress > databases/gomdb > databases/gosqlite3 > databases/levigo > databases/radix.v2 > databases/redigo > devel/go-bayesian > devel/go-cobra > devel/go-codec > devel/go-cpuid > devel/go-crc32 > devel/go-faker > devel/go-form > devel/go-go.uuid > devel/go-goregen > devel/go-hashicorp-logutils > devel/go-json-rest > devel/go-logrus > devel/go-metrics > devel/go-nuid > devel/go-pflag > devel/go-protobuf > devel/go-raw > devel/go-runewidth > devel/go-slices > devel/go-sql-driver > devel/go-uuid > devel/go-yaml > devel/goprotobuf > net/go-amqp > net/go-geoip > net/go-httppath > net/go-httptreemux > net/go-nats > net/go.net > security/go.crypto > security/goptlib > textproc/go.text > www/go-fasthttp > www/webgo > > Does anyone have any objection or reasoning why this doesn't make > sense? > > Thanks, > Steve > -- Best Regards. Christopher Hall.