Bug 236509 - Mk/Uses/go.mk: Remove support for installing Go libs and sources; add initial modules support
Summary: Mk/Uses/go.mk: Remove support for installing Go libs and sources; add initial...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL: https://reviews.freebsd.org/D19570
Keywords:
Depends on: 236502
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-13 13:49 UTC by Dmitri Goutnik
Modified: 2019-04-08 17:21 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Goutnik freebsd_committer freebsd_triage 2019-03-13 13:49:38 UTC
- Remove support for installing compiled Go libs into GO_LIBDIR and source code into GO_SRCDIR [1]
- Restrict build to only main packages by adding `-buildmode=exe` to GO_BUILDFLAGS [2]
- Add `modules` argument for initial support for building in module-aware mode. Current support is basic and does two things:
  - disables adding post-extract target and avoids creation of GOPATH dir structure (not needed in module mode)
  - disables network access during build by adding `-mod=vendor` to GO_BUILDFLAGS [3]

[1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#go-libs
[2] https://golang.org/cmd/go/#hdr-Build_modes
[3] https://golang.org/cmd/go/#hdr-Modules_and_vendoring
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-04-08 16:47:13 UTC
A commit references this bug:

Author: tobik
Date: Mon Apr  8 16:46:38 UTC 2019
New revision: 498386
URL: https://svnweb.freebsd.org/changeset/ports/498386

Log:
  Mk/Uses/go.mk: Remove support for installing Go libs and sources

  All ports that depend on it have been removed in r497504.

  - Restrict build to only main packages by adding -buildmode=exe to
    GO_BUILDFLAGS
  - Add initial support for building in module-aware mode

  PR:		236509
  Submitted by:	Dmitri Goutnik <dg@syrec.org>
  Reviewed by:	0mp, jlaffaye, tobik
  Approved by:	jlaffaye (maintainer)
  Differential Revision:	https://reviews.freebsd.org/D19570

Changes:
  head/Mk/Uses/go.mk